@@ -43,6 +43,7 @@ int main() {
43
43
high_resolution_clock::time_point t2;
44
44
45
45
// Stage 1
46
+ printf (" # Stage 1\n " );
46
47
t1 = high_resolution_clock::now ();
47
48
for (unsigned char i = 0 ; i < 100 ; ++i) {
48
49
if (unTestingRVA != cRTTI1.GetVTableOffsetFromModule (hTestDLL, " TestingDLL" )) {
@@ -80,6 +81,7 @@ int main() {
80
81
printf (" Bench (50 000 calls)............................= %lld ms\n " , duration_cast<std::chrono::milliseconds>(t2 - t1).count ());
81
82
82
83
// Stage 2
84
+ printf (" # Stage 2\n " );
83
85
t1 = high_resolution_clock::now ();
84
86
for (unsigned char i = 0 ; i < 100 ; ++i) {
85
87
if (unTestingRVA != cRTTI2.GetVTableOffsetFromModule (hTestDLL, " TestingDLL" )) {
@@ -117,6 +119,7 @@ int main() {
117
119
printf (" Bench (50 000 calls + Cache)....................= %lld ms\n " , duration_cast<std::chrono::milliseconds>(t2 - t1).count ());
118
120
119
121
// Stage 3
122
+ printf (" # Stage 3\n " );
120
123
t1 = high_resolution_clock::now ();
121
124
for (unsigned char i = 0 ; i < 100 ; ++i) {
122
125
if (unTestingRVA != cRTTI3.GetVTableOffsetFromModule (hTestDLL, " TestingDLL" )) {
@@ -154,6 +157,7 @@ int main() {
154
157
printf (" Bench (50 000 calls + MinIterations)............= %lld ms\n " , duration_cast<std::chrono::milliseconds>(t2 - t1).count ());
155
158
156
159
// Stage 4
160
+ printf (" # Stage 4\n " );
157
161
t1 = high_resolution_clock::now ();
158
162
for (unsigned char i = 0 ; i < 100 ; ++i) {
159
163
if (unTestingRVA != cRTTI4.GetVTableOffsetFromModule (hTestDLL, " TestingDLL" )) {
@@ -189,7 +193,6 @@ int main() {
189
193
}
190
194
t2 = high_resolution_clock::now ();
191
195
printf (" Bench (50 000 calls + Cache + MinIterations)....= %lld ms\n " , duration_cast<std::chrono::milliseconds>(t2 - t1).count ());
192
-
193
196
#endif // BENCHMARK_TEST
194
197
195
198
if (!unTestingRVA) {
@@ -202,6 +205,7 @@ int main() {
202
205
fnIsTrue IsTrue = reinterpret_cast <fnIsTrue>(pTestingDLL_VT[0 ]);
203
206
fnHelloWorld HelloWorld = reinterpret_cast <fnHelloWorld>(pTestingDLL_VT[1 ]);
204
207
208
+ printf (" # Result:\n " );
205
209
printf (" IsTrue = %s\n " , IsTrue (pTestingDLL_VT, nullptr ) ? " true" : " false" );
206
210
printf (" HelloWorld = %s\n " , HelloWorld (pTestingDLL_VT, nullptr ));
207
211
0 commit comments