Skip to content

Commit

Permalink
style (opt. benchmark)
Browse files Browse the repository at this point in the history
  • Loading branch information
issakomi committed May 17, 2024
1 parent 773ddc1 commit 00e09fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion GUI/graphicswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ template<typename T> void load_image(
#ifdef A_TMP_BENCHMARK
unsigned long long ecount1{};
unsigned long long ecount2{};
unsigned long long ecount3{};
#endif
QElapsedTimer etimer;
etimer.start();
Expand All @@ -1426,12 +1427,18 @@ template<typename T> void load_image(
}
else
{
#ifdef A_TMP_BENCHMARK
++ecount3;
#endif
etimer.start();
}
}
}
#ifdef A_TMP_BENCHMARK
std::cout << "while loop run " << ecount1 << " times, checked " << ecount2 << " times\n";
std::cout
<< "while loop run " << ecount1
<< " times, checked " << ecount2
<< " times, restarted " << ecount3 << " times\n";
#endif
}
//
Expand Down

0 comments on commit 00e09fa

Please sign in to comment.