Correction in the test case perf/modalg/bug27021.
std::pair<gp_Pnt, gp_Pnt> vertices;
clock_t t = clock();
- theDI << "\nRetrieving " << iterations << " vertices using approach A)...";
+ theDI << "\nRetrieving " << iterations << " vertices using approach A)...\n";
for (int i = 0; i < iterations; ++i)
{
vertices = getVerticesA(edge);
}
- theDI << "done in " << (clock() - t) / (double)CLOCKS_PER_SEC << " seconds\n";
+ theDI << "COUNTER RetrievingVertA" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
t = clock();
- theDI << "\nRetrieving " << iterations << " vertices using approach B)...";
+ theDI << "\nRetrieving " << iterations << " vertices using approach B)...\n";
for (int i = 0; i < iterations; ++i)
{
vertices = getVerticesB(edge);
}
- theDI << "done in " << (clock() - t) / (double)CLOCKS_PER_SEC << " seconds\n";
+ theDI << "COUNTER RetrievingVertB" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
return 0;
}
+++ /dev/null
-puts "========"
-puts "OCC27021"
-puts "========"
-puts ""
-###########################################################
-# TopExp::Vertices performance optimization
-###########################################################
-
-pload QAcommands
-
-if { [regexp {Debug mode} [dversion]] } {
- if { [regexp {Windows} [dversion]] } {
- set max_time 8.
- set max_time2 5.
- } else {
- set max_time 8.
- set max_time2 5.
- }
-} else {
- if { [regexp {Windows} [dversion]] } {
- set max_time 8.
- set max_time2 5.
- } else {
- set max_time 8.
- set max_time2 5.
- }
-}
-
-restore [locate_data_file bug27021_shape.brep] f
-
-set log [OCC27021 f]
-
-regexp {Retrieving 100000000 vertices using approach A\)\.\.\.done in ([-0-9.+eE]+) seconds} ${log} full A_sec
-regexp {Retrieving 100000000 vertices using approach B\)\.\.\.done in ([-0-9.+eE]+) seconds} ${log} full B_sec
-
-
-if { ${A_sec} > ${max_time} } {
- puts "Retrieving 100000000 vertices using approach A) is more than ${max_time} seconds - Faulty"
-} else {
- puts "Retrieving 100000000 vertices using approach A) is less than ${max_time} seconds - OK"
-}
-
-if { ${B_sec} > ${max_time2} } {
- puts "Retrieving 100000000 vertices using approach A) is more than ${max_time2} seconds - Faulty"
-} else {
- puts "Retrieving 100000000 vertices using approach A) is less than ${max_time2} seconds - OK"
-}
--- /dev/null
+puts "========"
+puts "OCC27021: TopExp::Vertices performance optimization"
+puts "========"
+puts ""
+
+pload QAcommands
+
+restore [locate_data_file bug27021_shape.brep] f
+
+OCC27021 f
\ No newline at end of file