| 1043 | } |
| 1044 | |
| 1045 | void TestDUChain::benchTypeRegistry() |
| 1046 | { |
| 1047 | IntegralTypeData data; |
| 1048 | data.m_dataType = IntegralType::TypeInt; |
| 1049 | data.typeClassId = IntegralType::Identity; |
| 1050 | data.inRepository = true; |
| 1051 | data.m_modifiers = 42; |
| 1052 | data.m_dynamic = false; |
| 1053 | data.refCount = 1; |
| 1054 | |
| 1055 | IntegralTypeData to; |
| 1056 | |
| 1057 | QFETCH(int, func); |
| 1058 | |
| 1059 | QBENCHMARK { |
| 1060 | switch (func) { |
| 1061 | case 0: |
| 1062 | TypeSystem::self().dataClassSize(data); |
| 1063 | break; |
| 1064 | case 1: |
| 1065 | TypeSystem::self().dynamicSize(data); |
| 1066 | break; |
| 1067 | case 2: { |
| 1068 | AbstractType::Ptr t(TypeSystem::self().create(&data)); |
| 1069 | break; |
| 1070 | } |
| 1071 | case 3: |
| 1072 | TypeSystem::self().isFactoryLoaded(data); |
| 1073 | break; |
| 1074 | case 4: |
| 1075 | TypeSystem::self().copy(data, to, !data.m_dynamic); |
| 1076 | break; |
| 1077 | case 5: |
| 1078 | TypeSystem::self().copy(data, to, data.m_dynamic); |
| 1079 | break; |
| 1080 | case 6: |
| 1081 | TypeSystem::self().callDestructor(&data); |
| 1082 | break; |
| 1083 | } |
| 1084 | } |
| 1085 | } |
| 1086 |
nothing calls this directly
no test coverage detected