diff --git a/dox/dev_guides/tests/tests.md b/dox/dev_guides/tests/tests.md index 1228480c20..e83bb06ea0 100644 --- a/dox/dev_guides/tests/tests.md +++ b/dox/dev_guides/tests/tests.md @@ -715,11 +715,24 @@ Possible options are: * 1 -- outputs only differences; * 2 -- additionally outputs the list of logs and directories present in one of directories only; * 3 -- (by default) additionally outputs progress messages; +* -image [filename] - compare images and save the resulting log in specified file ($dir1/diffimage-$dir2.log by default) +* -cpu [filename] - compare overall CPU and save the resulting log in specified file ($dir1/diffcpu-$dir2.log by default) +* -memory [filename] - compare memory delta and save the resulting log in specified file ($dir1/diffmemory-$dir2.log by default) +* -highlight_percent \ - highlight considerable (>value in %) deviations of CPU and memory (default value is 5%) Example: ~~~~~ -Draw[]> testdiff results-CR12345-2012-10-10T08:00 results-master-2012-10-09T21:20 +Draw[]> testdiff results/CR12345-2012-10-10T08:00 results/master-2012-10-09T21:20 +~~~~~ + +Particular tests can generate additional data that need to be compared by *testdiff* command. +For that, for each parameter to be controlled, the test should produce the line containing keyword "COUNTER* followed by arbitrary name of the parameter, then colon and numeric value of the parameter. + +Example of test code: + +~~~~~ +puts "COUNTER Memory heap usage at step 5: [meminfo h]" ~~~~~ @section testmanual_5 APPENDIX diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index d58ff06835..fbf177e89e 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -610,7 +610,7 @@ wait Syntax: ~~~~~ -chrono [ name start/stop/reset/show] +chrono [ name start/stop/reset/show/restart/[counter text]] ~~~~~ Without arguments, **chrono** activates Draw chronometers. The elapsed time ,cpu system and cpu user times for each command will be printed. @@ -619,7 +619,9 @@ With arguments, **chrono** is used to manage activated chronometers. You can per * run the chronometer (start). * stop the chronometer (stop). * reset the chronometer to 0 (reset). + * restart the chronometer (restart). * display the current time (show). + * display the current time with specified text (output example - *COUNTER text: N*), command testdiff will compare such outputs between two test runs (counter). **Example:** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.cpp} diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 15b7a41be1..3b06434fbc 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -100,20 +100,49 @@ static Standard_Integer chronom(Draw_Interpretor& di, C->Timer().Reset(); } else { - if (!strcasecmp(a[2],"reset")) - C->Timer().Reset(); - if (!strcasecmp(a[2],"start")) - C->Timer().Start(); - if (!strcasecmp(a[2],"stop")) - C->Timer().Stop(); - if (!strcasecmp(a[2],"show")) - C->Timer().Show(); + for (Standard_Integer anIter = 2; anIter < n; ++anIter) + { + TCollection_AsciiString anArg (a[anIter]); + anArg.LowerCase(); + + if (anArg == "reset") + { + C->Timer().Reset(); + } + else if (anArg == "restart") + { + C->Timer().Restart(); + } + else if (anArg == "start") + { + C->Timer().Start(); + } + else if (anArg == "stop") + { + C->Timer().Stop(); + } + else if (anArg == "show") + { + C->Timer().Show(); + } + else if (anArg == "counter") + { + Standard_Real aSeconds,aCPUtime; + Standard_Integer aMinutes, aHours; + C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime); + std::cout << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n"; + } + else + { + std::cerr << "Unknown argument '" << a[anIter] << "'!\n"; + } + } } } return 0; } -static Standard_Integer dchronom(Draw_Interpretor& I, +static Standard_Integer dchronom(Draw_Interpretor& theDI, Standard_Integer n,const char** a) { if ((n == 1) || (*a[1] == '0') || (*a[1] == '1')) { @@ -122,8 +151,8 @@ static Standard_Integer dchronom(Draw_Interpretor& I, else Draw_Chrono = (*a[1] == '1'); - if (Draw_Chrono) I << "Chronometers activated.\n"; - else I << "Chronometers desactivated.\n"; + if (Draw_Chrono) theDI << "Chronometers activated.\n"; + else theDI << "Chronometers desactivated.\n"; } else { Handle(Draw_Drawable3D) D = Draw::Get(a[1]); @@ -133,22 +162,50 @@ static Standard_Integer dchronom(Draw_Interpretor& I, } if (C.IsNull()) { C = new Draw_Chronometer(); - Draw::Set(a[1],C,Standard_False); + Draw::Set(a[1],C,Standard_False); } if (n <= 2) { C->Timer().Reset(); } else { - if (!strcasecmp(a[2],"reset")) - C->Timer().Reset(); - if (!strcasecmp(a[2],"start")) - C->Timer().Start(); - if (!strcasecmp(a[2],"stop")) - C->Timer().Stop(); - if (!strcasecmp(a[2],"show")) { - Standard_SStream ss; - C->Timer().Show(ss); - I << ss; + for (Standard_Integer anIter = 2; anIter < n; ++anIter) + { + TCollection_AsciiString anArg (a[anIter]); + anArg.LowerCase(); + + if (anArg == "reset") + { + C->Timer().Reset(); + } + else if (anArg == "restart") + { + C->Timer().Restart(); + } + else if (anArg == "start") + { + C->Timer().Start(); + } + else if (anArg == "stop") + { + C->Timer().Stop(); + } + else if (anArg == "show") + { + Standard_SStream ss; + C->Timer().Show(ss); + theDI << ss; + } + else if (anArg == "counter") + { + Standard_Real aSeconds,aCPUtime; + Standard_Integer aMinutes, aHours; + C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime); + theDI << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n"; + } + else + { + theDI << "Unknown argument '" << a[anIter] << "'!\n"; + } } } } diff --git a/src/DrawResources/TestCommands.tcl b/src/DrawResources/TestCommands.tcl index 2528db63f1..fb2b3deba9 100644 --- a/src/DrawResources/TestCommands.tcl +++ b/src/DrawResources/TestCommands.tcl @@ -1876,6 +1876,50 @@ proc _diff_show_ratio {value1 value2} { return "$value1 / $value2 \[[format "%+5.2f%%" [expr 100 * ($value1 - $value2) / double($value2)]]\]" } +# procedure to check cpu user time +proc _check_time {regexp_msg} { + upvar log log + upvar log1 log1 + upvar log2 log2 + upvar log_cpu log_cpu + upvar cpu cpu + upvar basename basename + upvar casename casename + set time1_list [dict create] + set time2_list [dict create] + set cpu_find UNDEFINED + + foreach line1 [split $log1 "\n"] { + if { [regexp "${regexp_msg}" $line1 dump chronometer_name cpu_find] } { + dict set time1_list "${chronometer_name}" "${cpu_find}" + } + } + + foreach line2 [split $log2 "\n"] { + if { [regexp "${regexp_msg}" $line2 dump chronometer_name cpu_find] } { + dict set time2_list "${chronometer_name}" "${cpu_find}" + } + } + + if { [llength [dict keys $time1_list]] != [llength [dict keys $time2_list]] } { + puts "Error: number of dchrono/chrono COUNTER are different in the same test cases" + } else { + foreach key [dict keys $time1_list] { + set time1 [dict get $time1_list $key] + set time2 [dict get $time2_list $key] + + # compare CPU user time with 10% precision (but not less 0.5 sec) + if { [expr abs ($time1 - $time2) > 0.5 + 0.05 * abs ($time1 + $time2)] } { + if {$cpu != false} { + _log_and_puts log_cpu "COUNTER $key: [split $basename /] $casename: [_diff_show_ratio $time1 $time2]" + } else { + _log_and_puts log "COUNTER $key: [split $basename /] $casename: [_diff_show_ratio $time1 $time2]" + } + } + } + } +} + # Procedure to compare results of two runs of test cases proc _test_diff {dir1 dir2 basename image cpu memory status verbose _logvar _logimage _logcpu _logmemory {_statvar ""}} { upvar $_logvar log @@ -1954,6 +1998,15 @@ proc _test_diff {dir1 dir2 basename image cpu memory status verbose _logvar _log continue } } + + if { ! $image } { + # check CPU user time in test cases + set checkCPURegexp "COUNTER (.+): (\[-0-9.+eE\]+)" + if { [regexp "${checkCPURegexp}" $log1] && + [regexp "${checkCPURegexp}" $log2] } { + _check_time "${checkCPURegexp}" + } + } # check CPU times if {$cpu != false || ($image == false && $cpu == false && $memory == false)} { diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx index bbedf8aa6b..c181f68398 100644 --- a/src/OSD/OSD_Chronometer.cxx +++ b/src/OSD/OSD_Chronometer.cxx @@ -199,6 +199,17 @@ void OSD_Chronometer::Reset () Cumul_user = Cumul_sys = 0.; } + +//======================================================================= +//function : Restart +//purpose : +//======================================================================= +void OSD_Chronometer::Restart () +{ + Stopped = Standard_True; + Start(); +} + //======================================================================= //function : Stop //purpose : diff --git a/src/OSD/OSD_Chronometer.hxx b/src/OSD/OSD_Chronometer.hxx index 8942d61613..697eb20793 100644 --- a/src/OSD/OSD_Chronometer.hxx +++ b/src/OSD/OSD_Chronometer.hxx @@ -54,7 +54,10 @@ public: //! Stops and Reinitializes the Chronometer. Standard_EXPORT virtual void Reset(); - + + //! Restarts the Chronometer. + Standard_EXPORT virtual void Restart(); + //! Stops the Chronometer. Standard_EXPORT virtual void Stop(); diff --git a/src/OSD/OSD_Timer.cxx b/src/OSD/OSD_Timer.cxx index 412a7ac505..b18e55a655 100644 --- a/src/OSD/OSD_Timer.cxx +++ b/src/OSD/OSD_Timer.cxx @@ -125,6 +125,18 @@ void OSD_Timer::Reset () OSD_Chronometer::Reset(); } +//======================================================================= +//function : Restart +//purpose : +//======================================================================= + +void OSD_Timer::Restart () +{ + TimeStart = GetWallClockTime(); + TimeCumul = 0.; + OSD_Chronometer::Restart(); +} + //======================================================================= //function : Show //purpose : diff --git a/src/OSD/OSD_Timer.hxx b/src/OSD/OSD_Timer.hxx index 5ff9e8a70e..c343e37746 100644 --- a/src/OSD/OSD_Timer.hxx +++ b/src/OSD/OSD_Timer.hxx @@ -52,7 +52,10 @@ public: //! Stops and reinitializes the timer with zero elapsed time. Standard_EXPORT virtual void Reset() Standard_OVERRIDE; - + + //! Restarts the Timer. + Standard_EXPORT virtual void Restart() Standard_OVERRIDE; + //! Shows both the elapsed time and CPU time on the standard output //! stream .The chronometer can be running (Lap Time) or //! stopped. diff --git a/tests/bugs/caf/bug1454 b/tests/bugs/caf/bug1454 deleted file mode 100644 index 3bf7e4b96f..0000000000 --- a/tests/bugs/caf/bug1454 +++ /dev/null @@ -1,34 +0,0 @@ - -puts "===== OCC1454 =====" -####################################################################################### -# Improve performance of TDF_Label::FindChild -####################################################################################### - -puts "Info: Open the document with 80000 sublabels of the label 0:2" -dchrono h reset -dchrono h start -Open [locate_data_file OCC1726.cbf] D -dchrono h stop -set TimeList [dchrono h show] - -regexp {Elapsed time: [-0-9.+eE]+ Hours ([-0-9.+eE]+) Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_min ElapsedTime_sec -regexp {CPU user time: ([-0-9.+eE]+) seconds} $TimeList full CPUusertime -regexp {CPU system time: ([-0-9.+eE]+) seconds} $TimeList full CPUsystemtime - -puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}" - -if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } { - puts "Elapsed time is more then 20.0 seconds - Faulty" - puts "Faulty OCC1454" -} elseif { ${CPUusertime} > 12 } { - puts "CPUusertime is more then 12 seconds - Faulty" - puts "Faulty OCC1454" -} elseif { ${CPUsystemtime} > 0.6 } { - puts "CPUsystemtime is more then 0.6 seconds" - puts "Faulty OCC1454" -} else { - puts "Elapsed time is less then 20 seconds - OK" - puts "CPU user time is less then 12 seconds - OK" - puts "CPU system time is less then 0.6 seconds - OK" - puts "OK for OCC1454" -} diff --git a/tests/bugs/caf/bug1454_std b/tests/bugs/caf/bug1454_std deleted file mode 100644 index 8464ff1367..0000000000 --- a/tests/bugs/caf/bug1454_std +++ /dev/null @@ -1,34 +0,0 @@ - -puts "===== OCC1454 =====" -####################################################################################### -# Improve performance of TDF_Label::FindChild -####################################################################################### - -puts "Info: Open the document with 80000 sublabels of the label 0:2" -dchrono h reset -dchrono h start -Open [locate_data_file OCC1726.std] D -dchrono h stop -set TimeList [dchrono h show] - -regexp {Elapsed time: [-0-9.+eE]+ Hours ([-0-9.+eE]+) Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_min ElapsedTime_sec -regexp {CPU user time: ([-0-9.+eE]+) seconds} $TimeList full CPUusertime -regexp {CPU system time: ([-0-9.+eE]+) seconds} $TimeList full CPUsystemtime - -puts "ElapsedTime = ${ElapsedTime_min} min ${ElapsedTime_sec} sec CPUusertime = ${CPUusertime} CPUsystemtime = ${CPUsystemtime}" - -if { ${ElapsedTime_sec} > 20.0 || ${ElapsedTime_min} != 0 } { - puts "Elapsed time is more then 20.0 seconds - Faulty" - puts "Faulty OCC1454" -} elseif { ${CPUusertime} > 12 } { - puts "CPUusertime is more then 12 seconds - Faulty" - puts "Faulty OCC1454" -} elseif { ${CPUsystemtime} > 0.6 } { - puts "CPUsystemtime is more then 0.6 seconds" - puts "Faulty OCC1454" -} else { - puts "Elapsed time is less then 20 seconds - OK" - puts "CPU user time is less then 12 seconds - OK" - puts "CPU system time is less then 0.6 seconds - OK" - puts "OK for OCC1454" -} diff --git a/tests/bugs/caf/bug5023 b/tests/bugs/caf/bug5023 deleted file mode 100755 index 4598c2d170..0000000000 --- a/tests/bugs/caf/bug5023 +++ /dev/null @@ -1,39 +0,0 @@ -puts "================" -puts "OCC5023" -puts "================" -puts "" -###################################################### -# Performance regression in opening OCAF file -###################################################### - -set aFile [locate_data_file OCC5023.cbf] - -puts "Info: Restore the document" - -if [info exists DD] { - catch {Close DD}; unset DD -} - -dchrono h reset -dchrono h start - -Open ${aFile} DD -dchrono h stop -set list [dchrono h show] -Close DD - -regexp {CPU user time: +([-0-9.+eE]+)} $list full CPU_user_time - -set Good_CPU_user_time 2. - -set CPU_user_time_percent [expr (${CPU_user_time} - ${Good_CPU_user_time}) / ${Good_CPU_user_time} * 100.] -set percent_max 0.1 - -puts "CPU_user_time = ${CPU_user_time}" -puts "Good_CPU_user_time = ${Good_CPU_user_time}" -puts "CPU_user_time_percent = ${CPU_user_time_percent}" - -if {${CPU_user_time_percent} > ${percent_max}} { - puts "Faulty OCC5023 : CPU user time is wrong" -} - diff --git a/tests/bugs/caf/bug5023_std b/tests/bugs/caf/bug5023_std deleted file mode 100644 index 4f255adf8d..0000000000 --- a/tests/bugs/caf/bug5023_std +++ /dev/null @@ -1,39 +0,0 @@ -puts "================" -puts "OCC5023" -puts "================" -puts "" -###################################################### -# Performance regression in opening OCAF file -###################################################### - -set aFile [locate_data_file OCC5023.std] - -puts "Info: Restore the document" - -if [info exists DD] { - catch {Close DD}; unset DD -} - -dchrono h reset -dchrono h start - -Open ${aFile} DD -dchrono h stop -set list [dchrono h show] -Close DD - -regexp {CPU user time: +([-0-9.+eE]+)} $list full CPU_user_time - -set Good_CPU_user_time 2. - -set CPU_user_time_percent [expr (${CPU_user_time} - ${Good_CPU_user_time}) / ${Good_CPU_user_time} * 100.] -set percent_max 0.1 - -puts "CPU_user_time = ${CPU_user_time}" -puts "Good_CPU_user_time = ${Good_CPU_user_time}" -puts "CPU_user_time_percent = ${CPU_user_time_percent}" - -if {${CPU_user_time_percent} > ${percent_max}} { - puts "Faulty OCC5023 : CPU user time is wrong" -} - diff --git a/tests/bugs/fclasses/bug25514 b/tests/bugs/fclasses/bug25514 deleted file mode 100644 index 480179b90e..0000000000 --- a/tests/bugs/fclasses/bug25514 +++ /dev/null @@ -1,48 +0,0 @@ -puts "========" -puts "OCC25514" -puts "========" -puts "" -######################################################################################### -# TKernel, OSD_Timer - do not accumulate error in timer within queries in running state -######################################################################################### - -# Set number of cycle iteration -set IterationCount 10000 -set iCounter 1 - -# Set rank of timer's value -set TimeRank 2 - -# Start timers -dchrono bug_info_1 reset -dchrono bug_info_2 reset -dchrono bug_info_1 start -dchrono bug_info_2 start - -# Operation cycle (show only one timer state) -while {$iCounter != $IterationCount} { - dchrono bug_info_1 show - set iCounter [expr {$iCounter + 1}] -} - -# Stop timers -dchrono bug_info_1 stop -dchrono bug_info_2 stop - -# Get timers value -set Timer_1 [dchrono bug_info_1 show] -set Timer_2 [dchrono bug_info_2 show] - -# Modify timers value for comparison -set TimerValue_1 [lindex $Timer_1 6] -set TimerValue_1 [string range $TimerValue_1 0 [expr {[string first "." $TimerValue_1] + $TimeRank}]] -set TimerValue_2 [lindex $Timer_2 6] -set TimerValue_2 [string range $TimerValue_2 0 [expr {[string first "." $TimerValue_2] + $TimeRank}]] - -# Comparison of timer's values -puts "Compare: [lindex $Timer_1 6] vs [lindex $Timer_2 6]" -if {$TimerValue_1 != $TimerValue_2} { - puts "ERROR: OCC25514 is reproduced." -} else { - puts "OK" -} diff --git a/tests/bugs/heal/bug24596_1 b/tests/bugs/heal/bug24596_1 deleted file mode 100755 index 761b2b5023..0000000000 --- a/tests/bugs/heal/bug24596_1 +++ /dev/null @@ -1,65 +0,0 @@ -puts "============" -puts "OCC24596" -puts "============" -puts "" -############################### -## Slow import of IGES data -############################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - cpulimit 8500 - if { [regexp {Windows} [dversion]] } { - set max_time 3000 - set max_time2 2300 - } else { - set max_time 5500 - set max_time2 4000 - } -} else { - cpulimit 2600 - if { [regexp {Windows} [dversion]] } { - set max_time 1100 - set max_time2 700 - } else { - set max_time 1600 - set max_time2 1000 - } -} - -# 1 - igesread -dchrono h reset -dchrono h start - -igesread [locate_data_file 100B_Nosecone_with_Triangular_FSS.igs] a 43479 - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of igesread is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time of igesread is less than ${max_time} seconds - OK" -} - -# 2 - checkshape -dchrono h2 reset -dchrono h2 start - -checkshape a_1 - -dchrono h2 stop -set q2 [dchrono h2 show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" - -if { $z2 > ${max_time2} } { - puts "Elapsed time of checkshape is more than ${max_time2} seconds - Faulty" -} else { - puts "Elapsed time of checkshape is less than ${max_time2} seconds - OK" -} diff --git a/tests/bugs/heal/bug24596_2 b/tests/bugs/heal/bug24596_2 deleted file mode 100755 index 35d688e807..0000000000 --- a/tests/bugs/heal/bug24596_2 +++ /dev/null @@ -1,65 +0,0 @@ -puts "============" -puts "OCC24596" -puts "============" -puts "" -############################### -## Slow import of IGES data -############################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - cpulimit 8500 - if { [regexp {Windows} [dversion]] } { - set max_time 3000 - set max_time2 2300 - } else { - set max_time 5500 - set max_time2 4000 - } -} else { - cpulimit 2600 - if { [regexp {Windows} [dversion]] } { - set max_time 1100 - set max_time2 700 - } else { - set max_time 1600 - set max_time2 1000 - } -} - -# 1 - igesread -dchrono h reset -dchrono h start - -igesread [locate_data_file 100B_Nosecone_with_Triangular_FSS.igs] b 86884 - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -# 2 - checkshape -dchrono h2 reset -dchrono h2 start - -checkshape b_1 - -dchrono h2 stop -set q2 [dchrono h2 show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" - -if { $z2 > ${max_time2} } { - puts "Elapsed time of checkshape is more than ${max_time2} seconds - Faulty" -} else { - puts "Elapsed time of checkshape is less than ${max_time2} seconds - OK" -} diff --git a/tests/bugs/mesh/bug24022 b/tests/bugs/mesh/bug24022 deleted file mode 100644 index f722a4dcd1..0000000000 --- a/tests/bugs/mesh/bug24022 +++ /dev/null @@ -1,30 +0,0 @@ -puts "==========" -puts "OCC24022" -puts "==========" -puts "" -##################################### -# Slow meshing in BRepMesh -##################################### - -restore [locate_data_file bug24022_hung_mesh.brep] result -tclean result -dchrono h reset -dchrono h start -incmesh result 0.1 -dchrono h stop -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time -if { $cpu_time > 3. } { - puts "Error : meshing is slow" -} else { - puts "OK: meshing is quite fast" -} -vinit -vdisplay result -vfit -vsetdispmode 1 - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png - - - diff --git a/tests/bugs/mesh/bug24968_1 b/tests/bugs/mesh/bug24968_1 deleted file mode 100644 index b8e9e7fda0..0000000000 --- a/tests/bugs/mesh/bug24968_1 +++ /dev/null @@ -1,47 +0,0 @@ -puts "==========" -puts "OCC24968" -puts "==========" -puts "" -##################################### -# Impove BRepMesh_Classifier to cope with intersection of huge number of wires -##################################### - -cpulimit 2500 - -restore [locate_data_file bug24968_Shape_1.brep] result - -tclean result -dchrono h reset -dchrono h start -incmesh result 0.1 -dchrono h stop - -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${info} full cpu_time - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 2500 - } else { - set max_time 2500 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 100 - } else { - set max_time 250 - } -} - -if { ${cpu_time} > ${max_time} } { - puts "Error : meshing is slow" -} else { - puts "OK: meshing is quite fast" -} - -vinit -vdisplay result -vfit -vsetdispmode 1 - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug24968_2 b/tests/bugs/mesh/bug24968_2 deleted file mode 100644 index 006fd07dc0..0000000000 --- a/tests/bugs/mesh/bug24968_2 +++ /dev/null @@ -1,47 +0,0 @@ -puts "==========" -puts "OCC24968" -puts "==========" -puts "" -##################################### -# Impove BRepMesh_Classifier to cope with intersection of huge number of wires -##################################### - -cpulimit 2500 - -restore [locate_data_file bug24968_Shape_1.brep] result - -tclean result -dchrono h reset -dchrono h start -incmesh result 0.1 -parallel -dchrono h stop - -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${info} full cpu_time - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 2500 - } else { - set max_time 2500 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 100 - } else { - set max_time 250 - } -} - -if { ${cpu_time} > ${max_time} } { - puts "Error : meshing is slow" -} else { - puts "OK: meshing is quite fast" -} - -vinit -vdisplay result -vfit -vsetdispmode 1 - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug19793_2 b/tests/bugs/modalg_1/bug19793_2 deleted file mode 100755 index 939cdfa1ea..0000000000 --- a/tests/bugs/modalg_1/bug19793_2 +++ /dev/null @@ -1,70 +0,0 @@ -puts "============" -puts "OCC19793" -puts "============" -puts "" -####################################################################### -# Fuse problem of symetrical shapes. Appendix for NPAL19789 -####################################################################### - -cpulimit 2500 -set BugNumber OCC19793 - -puts "Load first shape ..." -restore [locate_data_file bug19793_new_shape.brep] b1 -puts "Load second shape ..." -restore [locate_data_file bug19793_shape.brep] b2 - -puts "Prepare boolean operation ..." -dchrono perf_h reset -dchrono perf_h start -bop b1 b2 -dchrono perf_h stop - -puts "Start boolean operation ..." -bopsection result -puts "Finish boolean operation ..." - -checkprops result -l 17730.1 -checkshape result -checksection result - -checknbshapes result -vertex 68 -edge 70 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 139 - -# OCC23753 processing -# Performance verification of bop operation -set chrono_info [dchrono perf_h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - puts "Checking WINDOWS performance..." - if {$CPU_time > 1000.} { - puts "ERROR: OCC23753 is reproduced." - puts " Low performance: $CPU_time" - } - } else { - puts "Checking LINUX performance..." - if {$CPU_time > 2500.} { - puts "ERROR: OCC23753 is reproduced." - puts " Low performance: $CPU_time" - } - } -} else { - if { [regexp {Windows} [dversion]] } { - puts "Checking WINDOWS performance..." - # Initial CPU_time is 92-94 seconds for Windows - if {$CPU_time > 300.} { - puts "ERROR: OCC23753 is reproduced." - puts " Low performance: $CPU_time" - } - } else { - puts "Checking LINUX performance..." - # Initial CPU_time is 287-289 seconds for Linux - if {$CPU_time > 350.} { - puts "ERROR: OCC23753 is reproduced." - puts " Low performance: $CPU_time" - } - } -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug452_1 b/tests/bugs/modalg_2/bug452_1 deleted file mode 100755 index 9623e6af46..0000000000 --- a/tests/bugs/modalg_2/bug452_1 +++ /dev/null @@ -1,31 +0,0 @@ - -puts "========" -puts "OCC452" -puts "(case 1)" -puts "========" -puts "" - -pcone pc 10 0 20 -explode pc f - -prism pcy pc_2 0 0 10 - -dchrono h2 reset -dchrono h2 start - -bcut result pc pcy - -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 3 } { - puts "Elapsed time is more then 3 seconds - Faulty" -} else { - puts "Elapsed time is less then 3 seconds - OK" -} - -checkprops result -s 254.16 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png - diff --git a/tests/bugs/modalg_2/bug453_2 b/tests/bugs/modalg_2/bug453_2 deleted file mode 100755 index 792da668d8..0000000000 --- a/tests/bugs/modalg_2/bug453_2 +++ /dev/null @@ -1,40 +0,0 @@ -puts "TODO ?OCC25918 Windows: Error : The area of result shape is" -puts "TODO OCC24156 MacOS: Tcl Exception:" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" - -puts "========" -puts "OCC453" -puts "(case 2)" -puts "========" -puts "" - -dchrono h2 reset -dchrono h2 start - -set make_print_out 0 - -dset SCALE 1000. -dset SCALE1 5 -tolblend 0.01 1e-04 1e-05 1e-03 - -restore [locate_data_file shading_137.brep] s -tscale s 0 0 0 SCALE1 -explode s E - - blend result s 4.5*SCALE1 s_2 4.5*SCALE1 s_1 4.5*SCALE1 s_6 4.5*SCALE1 s_8 4.5*SCALE1 s_10 4.5*SCALE1 s_14 4.5*SCALE1 s_4 4.5*SCALE1 s_5 4.5*SCALE1 s_16 4.5*SCALE1 s_11 4.5*SCALE1 s_19 4.5*SCALE1 s_13 - explode result So - tcopy result_1 result - -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 110 } { - puts "Elapsed time is more then 110 seconds - Faulty" -} else { - puts "Elapsed time is less then 110 seconds - OK" -} - -checkprops result -s 3.65777e+06 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug23906 b/tests/bugs/modalg_5/bug23906 deleted file mode 100755 index 27878e75d0..0000000000 --- a/tests/bugs/modalg_5/bug23906 +++ /dev/null @@ -1,34 +0,0 @@ -puts "============" -puts "OCC23906" -puts "============" -puts "" -############################### -## Performance of the projection algorithm in some cases became lower after integration of the fix for the bug 0022610 -############################### - -restore [locate_data_file bug23906_f.brep] f - -point p 3.5527136788005e-015 100 100 - -dchrono h reset -dchrono h start - -projponf f p -min -t - -dchrono h stop -set q2 [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z -puts "$z" -if { [checkplatform -windows] } { - puts "OS = Windows NT" - set max_time 0.5 -} else { - puts "OS = Linux" - set max_time 0.1 -} -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/modalg_5/bug24696 b/tests/bugs/modalg_5/bug24696 deleted file mode 100644 index a7714e15a1..0000000000 --- a/tests/bugs/modalg_5/bug24696 +++ /dev/null @@ -1,55 +0,0 @@ -puts "=========" -puts "OCC24696" -puts "=========" -puts "" -########################################################### -# Lower performance of the new Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 100.0 - } else { - set max_time 200.0 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 25.0 - } else { - set max_time 40.0 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 100.0 -} - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24751_1 b/tests/bugs/modalg_5/bug24751_1 deleted file mode 100644 index 74575b0040..0000000000 --- a/tests/bugs/modalg_5/bug24751_1 +++ /dev/null @@ -1,59 +0,0 @@ -puts "=========" -puts "OCC24751" -puts "=========" -puts "" -########################################################### -# Performance improvements in the Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 250 - } else { - set max_time 290 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 65 - } else { - set max_time 100 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 320 -} - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -###------------------#### -trotate cx 0 0 0 0 0 1 45 -###------------------#### - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24751_2 b/tests/bugs/modalg_5/bug24751_2 deleted file mode 100644 index 3a607392a7..0000000000 --- a/tests/bugs/modalg_5/bug24751_2 +++ /dev/null @@ -1,59 +0,0 @@ -puts "=========" -puts "OCC24751" -puts "=========" -puts "" -########################################################### -# Performance improvements in the Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 300 - } else { - set max_time 400 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 100 - } else { - set max_time 120 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 440 -} - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -###------------------#### -trotate cx 0 0 0 0 1 1 45 -###------------------#### - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24751_3 b/tests/bugs/modalg_5/bug24751_3 deleted file mode 100644 index 9f5ee9bd8a..0000000000 --- a/tests/bugs/modalg_5/bug24751_3 +++ /dev/null @@ -1,59 +0,0 @@ -puts "=========" -puts "OCC24751" -puts "=========" -puts "" -########################################################### -# Performance improvements in the Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 500 - } else { - set max_time 500 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 130 - } else { - set max_time 160 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 260 -} - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -###------------------#### -trotate cx 0 0 0 1 1 1 45 -###------------------#### - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24751_4 b/tests/bugs/modalg_5/bug24751_4 deleted file mode 100644 index ac3004d1f0..0000000000 --- a/tests/bugs/modalg_5/bug24751_4 +++ /dev/null @@ -1,59 +0,0 @@ -puts "=========" -puts "OCC24751" -puts "=========" -puts "" -########################################################### -# Performance improvements in the Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 550 - } else { - set max_time 550 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 130 - } else { - set max_time 150 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 260 -} - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -###------------------#### -trotate cx 0 0 0 0 1 1 90 -###------------------#### - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24751_5 b/tests/bugs/modalg_5/bug24751_5 deleted file mode 100644 index 8d263ee7a1..0000000000 --- a/tests/bugs/modalg_5/bug24751_5 +++ /dev/null @@ -1,59 +0,0 @@ -puts "=========" -puts "OCC24751" -puts "=========" -puts "" -########################################################### -# Performance improvements in the Edge/Edge intersection algorithm -########################################################### - -pload QAcommands - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 300 - } else { - set max_time 500 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 100 - } else { - set max_time 150 - } -} - -if { [regexp {Mac OS X} [dversion]] } { - set max_time 270 -} - -dchrono h reset -dchrono h start - -restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx - -###------------------#### -trotate cx 0 0 0 1 1 1 90 -###------------------#### - -bclearobjects -bcleartools - -set edges [explode cx e] -set nbe [llength $edges] -for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} -bfillds -bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug25019 b/tests/bugs/modalg_5/bug25019 deleted file mode 100755 index 103d78d3be..0000000000 --- a/tests/bugs/modalg_5/bug25019 +++ /dev/null @@ -1,60 +0,0 @@ -puts "============" -puts "OCC25019" -puts "============" -puts "" -############################### -## Command "bsection" in Test Harness with flag build pcurve on second shape works slowly. -############################### - -restore [locate_data_file bug25019_a_shape_1.brep] a1 -restore [locate_data_file bug25019_prism.brep] p1 - -# 1. -dchrono h1 reset -dchrono h1 start - -bsection r a1 p1 -n2d2 - -dchrono h1 stop -set q1 [dchrono h1 show] - -# 2. -dchrono h2 reset -dchrono h2 start - -bsection r a1 p1 - -dchrono h2 stop -set q2 [dchrono h2 show] - -# -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q1 full t1 -puts "$t1" -if { [checkplatform -windows] } { - puts "OS = Windows NT" - set max_time1 20 -} else { - puts "OS = Linux" - set max_time1 30 -} -if { $t1 > ${max_time1} } { - puts "Elapsed time is more than ${max_time1} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time1} seconds - OK" -} - -# -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full t2 -puts "$t2" -if { [checkplatform -windows] } { - puts "OS = Windows NT" - set max_time2 20 -} else { - puts "OS = Linux" - set max_time2 30 -} -if { $t2 > ${max_time2} } { - puts "Elapsed time is more than ${max_time2} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time2} seconds - OK" -} diff --git a/tests/bugs/modalg_5/bug25058 b/tests/bugs/modalg_5/bug25058 deleted file mode 100755 index cea1cd9adf..0000000000 --- a/tests/bugs/modalg_5/bug25058 +++ /dev/null @@ -1,45 +0,0 @@ -puts "============" -puts "OCC25058" -puts "============" -puts "" -############################### -## Regression of performance of BRepExtrema_ExtCC (1000 times slower) -############################### - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 1 - set max_time2 1 - } else { - set max_time 1 - set max_time2 1 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 1 - set max_time2 1 - } else { - set max_time 1 - set max_time2 1 - } -} - -restore [locate_data_file bug25058_e1.brep] e1 -restore [locate_data_file bug25058_e2.brep] e2 - -dchrono h reset -dchrono h start - -distmini r e1 e2 - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of distmini is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time of distmini is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/modalg_5/bug25413 b/tests/bugs/modalg_5/bug25413 deleted file mode 100644 index e87037cecd..0000000000 --- a/tests/bugs/modalg_5/bug25413 +++ /dev/null @@ -1,63 +0,0 @@ -puts "========" -puts "OCC25413" -puts "========" -puts "" -############################################################# -# Line-Shape intersection algorithm became 400 times slower -############################################################# - -pload QAcommands - -restore [locate_data_file bug25413.brep] w - -dchrono perf_h reset -dchrono perf_h start -OCC25413 w -dchrono perf_h stop - -set chrono_info [dchrono perf_h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -puts "Elapsed time is: $CPU_time" - -if { [checkplatform -windows] } { - if {[regexp {Debug mode} [dversion]]} { - # initial CPU_time for WINDOWS in DEBUG mode is 90 sec - puts "Checking WINDOWS performance in debug mode..." - if {$CPU_time > 90.} { - puts "ERROR: OCC25413 is reproduced." - puts " Low performance: $CPU_time (but should be less than 90 sec)" - } else { - puts "Done!" - } - } else { - puts "Checking WINDOWS performance in optimize mode..." - # initial CPU_time for WINDOWS in OPTIMIZE mode is 30 sec - if {$CPU_time > 30.} { - puts "ERROR: OCC25413 is reproduced." - puts " Low performance: $CPU_time (but should be less than 30 sec)" - } else { - puts "Done!" - } - } -} else { - if {[regexp {Debug mode} [dversion]]} { - # initial CPU_time for LINUX in DEBUG mode is 90 sec - puts "Checking LINUX performance in debug mode..." - if {$CPU_time > 90.} { - puts "ERROR: OCC25413 is reproduced." - puts " Low performance: $CPU_time (but should be less than 90 sec)" - } else { - puts "Done!" - } - } else { - puts "Checking LINUX performance in optimize mode..." - # initial CPU_time for LINUX in OPTIMIZE mode is 30 sec - if {$CPU_time > 30.} { - puts "ERROR: OCC25413 is reproduced." - puts " Low performance: $CPU_time (but should be less than 30 sec)" - } else { - puts "Done!" - } - } -} diff --git a/tests/bugs/modalg_6/bug26327 b/tests/bugs/modalg_6/bug26327 deleted file mode 100755 index 184fb5c9ca..0000000000 --- a/tests/bugs/modalg_6/bug26327 +++ /dev/null @@ -1,45 +0,0 @@ -puts "============" -puts "OCC24596" -puts "============" -puts "" -############################### -## Slow import of IGES data -############################### - -pload XDE - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 30 - } else { - set max_time 30 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 10 - } else { - set max_time 10 - } -} - -dchrono h reset -dchrono h start - -stepread [locate_data_file bug26327_fuse_input.stp] a * - -for {set i 2} {$i < 22} {incr i} { - puts "a_$i" - bfuse a_1 a_1 a_$i - } - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of import of IGES data is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time of import of IGES data is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/modalg_6/bug26447 b/tests/bugs/modalg_6/bug26447 deleted file mode 100644 index 34e49d3b6b..0000000000 --- a/tests/bugs/modalg_6/bug26447 +++ /dev/null @@ -1,34 +0,0 @@ -puts "============" -puts "OCC26447" -puts "============" -puts "" -############################################################## -# Performance degradation intersecting cylindrical surfaces -############################################################# - -cylinder c1 0 0 0 1 0 0 0 -1 0 100 -cylinder c2 0 0 0 0 1 0 1 0 0 100 -mkface f1 c1 -mkface f2 c2 - -dchrono cr reset -dchrono cr start - -for {set i 1} {$i <= 1000} {incr i} { - bopcurves f1 f2 -} - -dchrono cr stop -if { [checkplatform -windows] } { - set max_time 7.5 -} else { - set max_time 4.5 -} -set TimeList [dchrono cr show] -regexp {Elapsed time: [-0-9.+eE]+ Hours [-0-9.+eE]+ Minutes ([-0-9.+eE]+) Seconds} $TimeList full ElapsedTime_sec - -if { ${ElapsedTime_sec} > ${max_time} } { - puts "Error: Elapsed time of intersecting is more than ${max_time} seconds" -} else { - puts "OK: Elapsed time of intersecting is less than ${max_time} seconds" -} diff --git a/tests/bugs/modalg_6/bug26914 b/tests/bugs/modalg_6/bug26914 deleted file mode 100644 index 353cf8caf6..0000000000 --- a/tests/bugs/modalg_6/bug26914 +++ /dev/null @@ -1,25 +0,0 @@ -puts "========" -puts "OCC26914" -puts "========" -puts "" -################################# -# Hang in surface approximation -################################# - -set max_time 2 - -restore [locate_data_file bug23943_s.draw] s - -dchrono cr reset -dchrono cr start -approxsurf rs s 5e-5 0 0 15 15 100 0 - -dchrono cr stop - -set chrono_info [dchrono cr show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -if { $CPU_time > ${max_time} } { - puts "Elapsed time of surface approximation is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time of surface approximation is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/modalg_6/bug27085_1 b/tests/bugs/modalg_6/bug27085_1 deleted file mode 100644 index b2a55994ee..0000000000 --- a/tests/bugs/modalg_6/bug27085_1 +++ /dev/null @@ -1,28 +0,0 @@ -puts "============" -puts "OCC27085" -puts "============" -puts "" -############################### -## ShapeUpgrade_UnifySameDomain very large performance difference for seemingly similar shapes -############################### - -restore [locate_data_file bug27085_fused_primitive.fast.brep] fp - -dchrono h reset -dchrono h start - -unifysamedom res fp - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -set max_time 5 - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/modalg_6/bug27085_2 b/tests/bugs/modalg_6/bug27085_2 deleted file mode 100644 index 1809422ae8..0000000000 --- a/tests/bugs/modalg_6/bug27085_2 +++ /dev/null @@ -1,28 +0,0 @@ -puts "============" -puts "OCC27085" -puts "============" -puts "" -############################### -## ShapeUpgrade_UnifySameDomain very large performance difference for seemingly similar shapes -############################### - -restore [locate_data_file bug27085_fused_primitive.slow.brep] sp - -dchrono h reset -dchrono h start - -unifysamedom res sp - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -set max_time 8 - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} diff --git a/tests/bugs/moddata_1/bug21292 b/tests/bugs/moddata_1/bug21292 deleted file mode 100755 index 02a0ece69d..0000000000 --- a/tests/bugs/moddata_1/bug21292 +++ /dev/null @@ -1,57 +0,0 @@ -puts "========" -puts "OCC21292" -puts "========" -puts "" -###################################################### -# Shading on large model too long -###################################################### - -set BugNumber OCC21292 - -# 1 munite -cpulimit 60 - -restore [locate_data_file OCC21292.brep] result - -vinit -vsetdispmode 1 - -chrono h reset; chrono h start -# -# DISPLAY OPERATION ----- START -# -vdisplay result -# -# DISPLAY OPERATION ----- FINISH -# -chrono h stop; set CPU_time_List [chrono h show] - -set CPU_user_time [lindex ${CPU_time_List} 11] -puts "CPU_user_time=${CPU_user_time}" - - -checkprops result -s 1.40193e+07 -checknbshapes result -vertex 372 -edge 369 -wire 2 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 745 - -if { [checkplatform -windows] } { - puts "windows" - set Good_CPU_user_time 0. -} else { - if {[string compare $tcl_platform(os) "SunOS"] == 0} { - puts "SunOS" - set Good_CPU_user_time 6. - } else { - puts "Linux" - set Good_CPU_user_time 6. - } -} - -# Check time boolean operation -if {${Good_CPU_user_time} > ${CPU_user_time}} { - puts "OK ${BugNumber} : CPU user time is good" -} else { - puts "Faulty ${BugNumber} : CPU user time is wrong" -} - - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_1/bug21858 b/tests/bugs/moddata_1/bug21858 deleted file mode 100755 index 24e9867591..0000000000 --- a/tests/bugs/moddata_1/bug21858 +++ /dev/null @@ -1,42 +0,0 @@ -puts "============" -puts "OCC21858" -puts "============" -puts "" -#################################### -# Visualization hangs on this face ( OCC21858.brep ) -#################################### - -set BugNumber OCC21858 -cpulimit 40 -restore [locate_data_file OCC21858.brep] result - -checkprops result -l 6.48642 -checksection result - -checknbshapes result -vertex 9 -edge 10 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 21 - -vinit -vsetdispmode 1 -dchrono TestTimer reset -dchrono TestTimer start -vdisplay result -dchrono TestTimer stop -vfit -puts "" -set time_o 0.1 -set tim [ dchrono TestTimer show ] -regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} $tim full hourVDisplay minuVDisplay secoVDisplay - -set timVDisplay [expr $hourVDisplay * 3600 + $minuVDisplay * 60 + $secoVDisplay ] - -if { ${tim} < ${time_o} } { - set chro "CHRONO : Faulty (${timVDisplay}%)" - set status 1 - puts ${chro} -} else { - puts "${BugNumber} OK" - set status 0 -} -puts "timVDisplay = ${timVDisplay}" - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_3/bug25487_1 b/tests/bugs/moddata_3/bug25487_1 deleted file mode 100644 index 57fa4f33db..0000000000 --- a/tests/bugs/moddata_3/bug25487_1 +++ /dev/null @@ -1,67 +0,0 @@ -puts "========" -puts "OCC25487" -puts "========" -puts "" -########################################## -# Extrema_GenExtPS needs to be optimized -########################################## - -pload DATAEXCHANGEKERNEL - -# Restore testing shape and get timing characteristics for operation stepread -dchrono perf_h reset -dchrono perf_h start -stepread [locate_data_file OCC25487_LP1.stp] a * -dchrono perf_h stop - -# Get elapsed time for operation stepread -set chrono_info [dchrono perf_h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -puts "Elapsed time is: $CPU_time" - -# Check prformance on Windows -if { [checkplatform -windows] } { - if {[regexp {Debug mode} [dversion]]} { - # DEBUG mode - # initial CPU_time for WINDOWS in DEBUG mode is 410 ((186+19)*2) sec - puts "Checking WINDOWS performance in debug mode..." - if {$CPU_time > 410.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 410 sec)" - } else { - puts "Done!" - } - } else { - # OPTIMIZE mode - # initial CPU_time for WINDOWS in OPTIMIZE mode is 205 (186+19) sec - puts "Checking WINDOWS performance in optimize mode..." - if {$CPU_time > 205.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 205 sec)" - } else { - puts "Done!" - } - } -} else { - if {[regexp {Debug mode} [dversion]]} { - # DEBUG mode - # initial CPU_time for LINUX in DEBUG mode is 900 sec - puts "Checking LINUX performance in debug mode..." - if {$CPU_time > 900.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 900 sec)" - } else { - puts "Done!" - } - } else { - # OPTIMIZE mode - # initial CPU_time for LINUX in OPTIMIZE mode is 190 (173+17) sec - puts "Checking LINUX performance in optimize mode..." - if {$CPU_time > 190.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 190 sec)" - } else { - puts "Done!" - } - } -} diff --git a/tests/bugs/moddata_3/bug25487_2 b/tests/bugs/moddata_3/bug25487_2 deleted file mode 100644 index 17b300f55d..0000000000 --- a/tests/bugs/moddata_3/bug25487_2 +++ /dev/null @@ -1,69 +0,0 @@ -puts "========" -puts "OCC25487" -puts "========" -puts "" -########################################## -# Extrema_GenExtPS needs to be optimized -########################################## - -cpulimit 1500 - -pload DATAEXCHANGEKERNEL - -# Restore testing shape and get timing characteristics for operation stepread -dchrono perf_h reset -dchrono perf_h start -stepread [locate_data_file OCC25487_LP2.stp] a * -dchrono perf_h stop - -# Get elapsed time for operation stepread -set chrono_info [dchrono perf_h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -puts "Elapsed time is: $CPU_time" - -# Check prformance on Windows -if { [checkplatform -windows] } { - if {[regexp {Debug mode} [dversion]]} { - # DEBUG mode - # initial CPU_time for WINDOWS in DEBUG mode is 1208 ((549+55)*2) sec - puts "Checking WINDOWS performance in debug mode..." - if {$CPU_time > 1208.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 1208 sec)" - } else { - puts "Done!" - } - } else { - # OPTIMIZE mode - # initial CPU_time for WINDOWS in OPTIMIZE mode is 604 (549+55) sec - puts "Checking WINDOWS performance in optimize mode..." - if {$CPU_time > 604.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 604 sec)" - } else { - puts "Done!" - } - } -} else { - if {[regexp {Debug mode} [dversion]]} { - # DEBUG mode - # initial CPU_time for LINUX in DEBUG mode is 1500 sec - puts "Checking LINUX performance in debug mode..." - if {$CPU_time > 1500.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 1500 sec)" - } else { - puts "Done!" - } - } else { - # OPTIMIZE mode - # initial CPU_time for LINUX in OPTIMIZE mode is 575 (523+52) sec - puts "Checking LINUX performance in optimize mode..." - if {$CPU_time > 575.} { - puts "ERROR: OCC25487 is reproduced." - puts " Low performance: $CPU_time (but should be less than 575 sec)" - } else { - puts "Done!" - } - } -} diff --git a/tests/bugs/step/bug24024 b/tests/bugs/step/bug24024 deleted file mode 100644 index b86e08d378..0000000000 --- a/tests/bugs/step/bug24024 +++ /dev/null @@ -1,33 +0,0 @@ -puts "==========" -puts "OCC24024" -puts "==========" -puts "" -###################################### -# Slow import of specific STEP data -###################################### - -cpulimit 1700 -set ver [dversion] -if { [regexp "Debug" $ver] != 1 } { - set cpu_check 450 -} else { - set cpu_check 1600 -} - -dchrono h reset -dchrono h start -stepread [locate_data_file bug24024_slow_import.stp] a * -dchrono h stop - -tpcompound result - -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time -if { $cpu_time > $cpu_check } { - puts "Error: performance of import of data is low" -} else { - puts "OK: performance of import of data is high" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png - diff --git a/tests/boolean/bfuse_complex/Q3 b/tests/perf/bop/bfuse_complex_Q3 similarity index 53% rename from tests/boolean/bfuse_complex/Q3 rename to tests/perf/bop/bfuse_complex_Q3 index 1549f7c10e..4a83dafb2c 100644 --- a/tests/boolean/bfuse_complex/Q3 +++ b/tests/perf/bop/bfuse_complex_Q3 @@ -16,44 +16,25 @@ restore [locate_data_file buc60068b.rle] h ## fuse dchrono j start bfuse resab a b -dchrono j stop +dchrono j stop counter BFuseAB tscale c 0 0 0 100 tscale d 0 0 0 100 dchrono k start bfuse rescd c d -dchrono k stop +dchrono k stop counter BFuseCD tscale e 0 0 0 1000 tscale f 0 0 0 1000 dchrono l start bfuse resef e f -dchrono l stop +dchrono l stop counter BFuseEF tscale g 0 0 0 10000 tscale h 0 0 0 10000 dchrono m start bfuse resgh g h -dchrono m stop - -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono j show] full Jseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono k show] full Kseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono l show] full Lseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono m show] full Mseconds - -#sometimes CPU user time may be 0 -set Jtime [expr ($Jseconds * 1.1) + 0.2] -set Ktime $Kseconds -set Ltime $Lseconds -set Mtime $Mseconds - -if { $Jtime < $Ktime || $Jtime < $Ltime || $Jtime < $Mtime} { - puts "Error: incorrect performance of bfuse operation:" - puts "SCALE=1 : $Jtime seconds." - puts "SCALE=100 : $Ktime seconds." - puts "SCALE=1000 : $Ltime seconds." - puts "SCALE=10000 : $Mtime seconds." -} +dchrono m stop counter BFuseGH compound resab rescd resef resgh result diff --git a/tests/perf/bop/boxholes b/tests/perf/bop/boxholes index 4b42a77712..6c6ebfab73 100644 --- a/tests/perf/bop/boxholes +++ b/tests/perf/bop/boxholes @@ -10,14 +10,6 @@ puts "" # http://www.opencascade.org/org/forum/thread_12369/?forum=3 # in OCCT 6.6.0 32-bit mode on Windows this fails with N >= 40 (out of memory) -if { [regexp {Debug mode} [dversion]] } { - cpulimit 2000 - set max_time 1500 -} else { - cpulimit 500 - set max_time 250 -} - # box plate to cut the holes from box b 100 100 1 @@ -38,14 +30,11 @@ eval compound $holes drill set mem1 [meminfo h] -dchrono cpu reset -dchrono cpu start +dchrono cpu restart bcut r b drill -dchrono cpu stop -puts [dchrono cpu show] -set q2 [dchrono cpu show] +dchrono cpu stop counter BCut set mem2 [meminfo h] @@ -60,13 +49,6 @@ if { [expr ${mem2} - ${mem1}] > ${mem_delta}} { puts "Faulty : there is memory leak" } -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${q2} full z -if { ${z} > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - vinit vdisplay r vfit diff --git a/tests/boolean/bsection/R6 b/tests/perf/bop/bsection_R6 similarity index 54% rename from tests/boolean/bsection/R6 rename to tests/perf/bop/bsection_R6 index cc89f24275..f156398127 100644 --- a/tests/boolean/bsection/R6 +++ b/tests/perf/bop/bsection_R6 @@ -16,44 +16,25 @@ restore [locate_data_file buc60068b.rle] h ## section dchrono j start bsection resab a b -dchrono j stop +dchrono j stop counter BSectionAB tscale c 0 0 0 100 tscale d 0 0 0 100 dchrono k start bsection rescd c d -dchrono k stop +dchrono k stop counter BSectionCD tscale e 0 0 0 1000 tscale f 0 0 0 1000 dchrono l start bsection resef e f -dchrono l stop +dchrono l stop counter BSectionEF tscale g 0 0 0 10000 tscale h 0 0 0 10000 dchrono m start bsection resgh g h -dchrono m stop - -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono j show] full Jseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono k show] full Kseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono l show] full Lseconds -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono m show] full Mseconds - -#sometimes CPU user time may be 0 -set Jtime [expr ($Jseconds * 1.1) + 0.2] -set Ktime $Kseconds -set Ltime $Lseconds -set Mtime $Mseconds - -if { $Jtime < $Ktime || $Jtime < $Ltime || $Jtime < $Mtime} { - puts "Error: incorrect performance of bsection operation:" - puts "SCALE=1 : $Jtime seconds." - puts "SCALE=100 : $Ktime seconds." - puts "SCALE=1000 : $Ltime seconds." - puts "SCALE=10000 : $Mtime seconds." -} +dchrono m stop counter BSectionGH compound resab rescd resef resgh result diff --git a/tests/perf/bop/end b/tests/perf/bop/end new file mode 100644 index 0000000000..da9245f6d2 --- /dev/null +++ b/tests/perf/bop/end @@ -0,0 +1,3 @@ +if { [isdraw result] } { + checkshape result +} \ No newline at end of file diff --git a/tests/perf/caf/begin b/tests/perf/caf/begin new file mode 100644 index 0000000000..322282c6de --- /dev/null +++ b/tests/perf/caf/begin @@ -0,0 +1,3 @@ +pload DCAF + +set subgroup caf diff --git a/tests/perf/caf/bug1454 b/tests/perf/caf/bug1454 new file mode 100644 index 0000000000..9ba780631e --- /dev/null +++ b/tests/perf/caf/bug1454 @@ -0,0 +1,10 @@ + +puts "===== OCC1454 =====" +####################################################################################### +# Improve performance of TDF_Label::FindChild +####################################################################################### + +puts "Info: Open the document with 80000 sublabels of the label 0:2" +dchrono h restart +Open [locate_data_file OCC1726.cbf] D +dchrono h stop counter OpenCbf \ No newline at end of file diff --git a/tests/perf/caf/bug1454_std b/tests/perf/caf/bug1454_std new file mode 100644 index 0000000000..0dee9dccdb --- /dev/null +++ b/tests/perf/caf/bug1454_std @@ -0,0 +1,10 @@ + +puts "===== OCC1454 =====" +####################################################################################### +# Improve performance of TDF_Label::FindChild +####################################################################################### + +puts "Info: Open the document with 80000 sublabels of the label 0:2" +dchrono h restart +Open [locate_data_file OCC1726.std] D +dchrono h stop counter OpenStd \ No newline at end of file diff --git a/tests/bugs/caf/bug1726 b/tests/perf/caf/bug1726 similarity index 75% rename from tests/bugs/caf/bug1726 rename to tests/perf/caf/bug1726 index ca371f74e6..ec683a163e 100644 --- a/tests/bugs/caf/bug1726 +++ b/tests/perf/caf/bug1726 @@ -7,20 +7,15 @@ puts "" ####################################################################################### puts "Info: Open the document with 80000 sublabels of the label 0:2" -chrono h reset; chrono h start +dchrono h restart Open [locate_data_file OCC1726.cbf] D -chrono h stop; chrono h show +dchrono h stop counter OpenCbf -set IsGood 1 puts "Info: Close the document" -chrono h reset; chrono h start +dchrono h restart if [catch {Close D} result] { - set IsGood 0 -} -chrono h stop; chrono h show - -if { ${IsGood} == 0} { puts "Faulty OCC1726" } else { puts "OK OCC1726" } +dchrono h stop counter CloseDoc diff --git a/tests/bugs/caf/bug1726_std b/tests/perf/caf/bug1726_std similarity index 75% rename from tests/bugs/caf/bug1726_std rename to tests/perf/caf/bug1726_std index 828829c878..5bc44c9ca9 100644 --- a/tests/bugs/caf/bug1726_std +++ b/tests/perf/caf/bug1726_std @@ -7,20 +7,15 @@ puts "" ####################################################################################### puts "Info: Open the document with 80000 sublabels of the label 0:2" -chrono h reset; chrono h start +dchrono h restart Open [locate_data_file OCC1726.std] D -chrono h stop; chrono h show +dchrono h stop counter OpenStd -set IsGood 1 puts "Info: Close the document" -chrono h reset; chrono h start +dchrono h restart if [catch {Close D} result] { - set IsGood 0 -} -chrono h stop; chrono h show - -if { ${IsGood} == 0} { puts "Faulty OCC1726" } else { puts "OK OCC1726" } +dchrono h stop counter CloseDoc diff --git a/tests/bugs/caf/bug2793 b/tests/perf/caf/bug2793 similarity index 76% rename from tests/bugs/caf/bug2793 rename to tests/perf/caf/bug2793 index 530f600aa8..cb0f55134d 100644 --- a/tests/bugs/caf/bug2793 +++ b/tests/perf/caf/bug2793 @@ -40,23 +40,7 @@ NewShape D ${lab8} shape8 # Save document file delete -force ${imagedir}/2793.cbf -dchrono h reset -dchrono h start +dchrono h restart SaveAs D ${imagedir}/2793.cbf -dchrono h stop -Close D - -# Check -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time - -set max_time 100 -if { [regexp {Debug mode} [dversion]] } { - set max_time 200 -} - -if { $cpu_time > ${max_time} } { - puts "Error: performance saving document D is too low" -} else { - puts "OK: performance saving document D is high" -} +dchrono h stop counter SaveAs +Close D \ No newline at end of file diff --git a/tests/perf/caf/bug5023 b/tests/perf/caf/bug5023 new file mode 100644 index 0000000000..54e6782896 --- /dev/null +++ b/tests/perf/caf/bug5023 @@ -0,0 +1,20 @@ +puts "================" +puts "OCC5023" +puts "================" +puts "" +###################################################### +# Performance regression in opening OCAF file +###################################################### + +set aFile [locate_data_file OCC5023.cbf] + +puts "Info: Restore the document" + +if [info exists DD] { + catch {Close DD}; unset DD +} + +dchrono h restart + +Open ${aFile} DD +dchrono h stop counter OpenDoc \ No newline at end of file diff --git a/tests/perf/caf/bug5023_std b/tests/perf/caf/bug5023_std new file mode 100644 index 0000000000..a7cf3832b5 --- /dev/null +++ b/tests/perf/caf/bug5023_std @@ -0,0 +1,20 @@ +puts "================" +puts "OCC5023" +puts "================" +puts "" +###################################################### +# Performance regression in opening OCAF file +###################################################### + +set aFile [locate_data_file OCC5023.std] + +puts "Info: Restore the document" + +if [info exists DD] { + catch {Close DD}; unset DD +} + +dchrono h restart + +Open ${aFile} DD +dchrono h stop counter OpenDoc \ No newline at end of file diff --git a/tests/perf/de/begin b/tests/perf/de/begin new file mode 100644 index 0000000000..3d2248a44e --- /dev/null +++ b/tests/perf/de/begin @@ -0,0 +1 @@ +pload XDE diff --git a/tests/perf/de/bug24024 b/tests/perf/de/bug24024 new file mode 100644 index 0000000000..834c2ef8b3 --- /dev/null +++ b/tests/perf/de/bug24024 @@ -0,0 +1,17 @@ +puts "==========" +puts "OCC24024" +puts "==========" +puts "" +###################################### +# Slow import of specific STEP data +###################################### + +cpulimit 1700 + +dchrono h restart +stepread [locate_data_file bug24024_slow_import.stp] a * +dchrono h stop counter stepread + +tpcompound result +checkview -display result -2d -path ${imagedir}/${test_image}.png + diff --git a/tests/perf/de/bug26338_1 b/tests/perf/de/bug26338_1 index c0a62ad688..7292e03e89 100644 --- a/tests/perf/de/bug26338_1 +++ b/tests/perf/de/bug26338_1 @@ -3,14 +3,12 @@ puts "0026338: STL export (especially binary) needs a lot of time if selected ex puts "========" puts "" -pload MODELING XSDRAW - # make sphere triangulated with 2M triangles sphere s 10 tessellate result s 1000 1000 trinfo result # write to binary STL -chrono s reset; chrono s start +chrono s restart writestl result $imagedir/${casename}-binary.stl 1 -chrono s stop; chrono s show +chrono s stop counter writestl diff --git a/tests/perf/de/bug26338_2 b/tests/perf/de/bug26338_2 index 7342fb3815..b4700916d8 100644 --- a/tests/perf/de/bug26338_2 +++ b/tests/perf/de/bug26338_2 @@ -3,14 +3,12 @@ puts "0026338: STL export (especially binary) needs a lot of time if selected ex puts "========" puts "" -pload MODELING XSDRAW - # make sphere triangulated with 2M triangles sphere s 10 tessellate result s 1000 1000 trinfo result # write to ascii STL -chrono s reset; chrono s start +dchrono s restart writestl result $imagedir/${casename}-ascii.stl 0 -chrono s stop; chrono s show +dchrono s stop counter writestl \ No newline at end of file diff --git a/tests/bugs/step/bug27570 b/tests/perf/de/bug27570 similarity index 50% rename from tests/bugs/step/bug27570 rename to tests/perf/de/bug27570 index 1ce0febca4..3697e92975 100644 --- a/tests/bugs/step/bug27570 +++ b/tests/perf/de/bug27570 @@ -8,19 +8,9 @@ puts "" set max_time 8 -dchrono cr reset -dchrono cr start +dchrono cr restart ReadStep D [locate_data_file bug27570.stp] -dchrono cr stop - -# check time -set chrono_info [dchrono cr show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -if { $CPU_time > ${max_time} } { - puts "CPU user time of STEP translation is more than ${max_time} seconds - Error" -} else { - puts "CPU user time of STEP translation is less than ${max_time} seconds - OK" -} +dchrono cr stop counter ReadStep # check number of shapes XGetOneShape result D diff --git a/tests/perf/fclasses/bug25514 b/tests/perf/fclasses/bug25514 new file mode 100644 index 0000000000..96aa49fdd3 --- /dev/null +++ b/tests/perf/fclasses/bug25514 @@ -0,0 +1,27 @@ +puts "========" +puts "OCC25514" +puts "========" +puts "" +######################################################################################### +# TKernel, OSD_Timer - do not accumulate error in timer within queries in running state +######################################################################################### + +# Set number of cycle iteration +set IterationCount 10000 +set iCounter 1 + +# Set rank of timer's value +set TimeRank 2 + +# Start timers +dchrono bug_info_1 restart +dchrono bug_info_2 restart + +# Operation cycle +while {$iCounter != $IterationCount} { + set iCounter [expr {$iCounter + 1}] +} + +# Stop timers and show timer's values +dchrono bug_info_1 stop counter bug_info_1 +dchrono bug_info_2 stop counter bug_info_2 diff --git a/tests/bugs/fclasses/bug26184_1 b/tests/perf/fclasses/bug26184_1 similarity index 65% rename from tests/bugs/fclasses/bug26184_1 rename to tests/perf/fclasses/bug26184_1 index ce66d87517..6a2ad98fcb 100644 --- a/tests/bugs/fclasses/bug26184_1 +++ b/tests/perf/fclasses/bug26184_1 @@ -14,13 +14,6 @@ mkcurve c2 a2 cpulimit 20 -dchrono h reset; dchrono h start +dchrono h restart extrema c1 c2 -dchrono h stop; dchrono h show - -regexp {CPU user time: (\d*)} [dchrono h show] dummy sec -if {$sec > 10} { - puts "Error: too long computation time $sec seconds" -} else { - puts "Computation time is OK" -} +dchrono h stop counter extrema \ No newline at end of file diff --git a/tests/bugs/fclasses/bug26184_2 b/tests/perf/fclasses/bug26184_2 similarity index 65% rename from tests/bugs/fclasses/bug26184_2 rename to tests/perf/fclasses/bug26184_2 index d211bfb61e..0c64d8cc13 100644 --- a/tests/bugs/fclasses/bug26184_2 +++ b/tests/perf/fclasses/bug26184_2 @@ -14,13 +14,6 @@ mkcurve c2 a2 cpulimit 20 -dchrono h reset; dchrono h start +dchrono h restart extrema c1 c2 -dchrono h stop; dchrono h show - -regexp {CPU user time: (\d*)} [dchrono h show] dummy sec -if {$sec > 10} { - puts "Error: too long computation time $sec seconds" -} else { - puts "Computation time is OK" -} +dchrono h stop counter extrema \ No newline at end of file diff --git a/tests/bugs/fclasses/bug27131 b/tests/perf/fclasses/bug27131 similarity index 71% rename from tests/bugs/fclasses/bug27131 rename to tests/perf/fclasses/bug27131 index 7f833ff7bf..6200c0e941 100644 --- a/tests/bugs/fclasses/bug27131 +++ b/tests/perf/fclasses/bug27131 @@ -11,18 +11,11 @@ explode aShape cpulimit 20 # Check computation time -chrono h reset; chrono h start +dchrono h restart for { set i 1 } { $i <= 100 } { incr i } { distmini d aShape_1 aShape_2 } -chrono h stop; chrono h show - -regexp {CPU user time: (\d*)} [dchrono h show] dummy sec -if {$sec > 1} { - puts "Error: too long computation time $sec seconds" -} else { - puts "Computation time is OK" -} +dchrono h stop counter distmini # Check result of distance distance set absTol 1.0e-10 diff --git a/tests/bugs/fclasses/bug27371 b/tests/perf/fclasses/bug27371 similarity index 72% rename from tests/bugs/fclasses/bug27371 rename to tests/perf/fclasses/bug27371 index 9b9de46353..b04bd3c336 100644 --- a/tests/bugs/fclasses/bug27371 +++ b/tests/perf/fclasses/bug27371 @@ -11,19 +11,12 @@ explode aShape cpulimit 20 # Check computation time -chrono h reset; chrono h start +dchrono h restart for { set i 1 } { $i <= 100 } { incr i } { distmini d aShape_1 aShape_2 distmini d aShape_2 aShape_1 } -chrono h stop; chrono h show - -regexp {CPU user time: (\d*)} [dchrono h show] dummy sec -if {$sec > 1} { - puts "Error: too long computation time $sec seconds" -} else { - puts "Computation time is OK" -} +dchrono h stop counter distmini # Check result of distance distance set absTol 1.0e-10 diff --git a/tests/perf/grids.list b/tests/perf/grids.list index cd71cf3b5c..aa8ed78e0d 100644 --- a/tests/perf/grids.list +++ b/tests/perf/grids.list @@ -3,3 +3,10 @@ 003 bspline 004 fclasses 005 de +006 caf +007 heal +008 mesh +009 modalg +010 moddata +011 sewing +012 vis \ No newline at end of file diff --git a/tests/perf/heal/begin b/tests/perf/heal/begin new file mode 100644 index 0000000000..d054565454 --- /dev/null +++ b/tests/perf/heal/begin @@ -0,0 +1 @@ +pload XSDRAW \ No newline at end of file diff --git a/tests/perf/heal/bug24596_1 b/tests/perf/heal/bug24596_1 new file mode 100644 index 0000000000..aa242c8aa4 --- /dev/null +++ b/tests/perf/heal/bug24596_1 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC24596" +puts "============" +puts "" +############################### +## Slow import of IGES data +############################### + +pload QAcommands + +if { [regexp {Debug mode} [dversion]] } { + cpulimit 8500 +} else { + cpulimit 2600 +} + +# 1 - igesread +dchrono h restart +igesread [locate_data_file 100B_Nosecone_with_Triangular_FSS.igs] a 43479 +dchrono h stop counter igesread + +# 2 - checkshape +dchrono h2 restart +checkshape a_1 +dchrono h2 stop counter checkshape \ No newline at end of file diff --git a/tests/perf/heal/bug24596_2 b/tests/perf/heal/bug24596_2 new file mode 100644 index 0000000000..aeedf833d1 --- /dev/null +++ b/tests/perf/heal/bug24596_2 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC24596" +puts "============" +puts "" +############################### +## Slow import of IGES data +############################### + +pload QAcommands + +if { [regexp {Debug mode} [dversion]] } { + cpulimit 8500 +} else { + cpulimit 2600 +} + +# 1 - igesread +dchrono h restart +igesread [locate_data_file 100B_Nosecone_with_Triangular_FSS.igs] b 86884 +dchrono h stop counter igesread + +# 2 - checkshape +dchrono h2 restart +checkshape b_1 +dchrono h2 stop counter checkshape \ No newline at end of file diff --git a/tests/bugs/heal/bug25424 b/tests/perf/heal/bug25424 old mode 100755 new mode 100644 similarity index 52% rename from tests/bugs/heal/bug25424 rename to tests/perf/heal/bug25424 index 585a41e843..ebc77da172 --- a/tests/bugs/heal/bug25424 +++ b/tests/perf/heal/bug25424 @@ -9,32 +9,9 @@ puts "" pload XDE pload QAcommands -if { [regexp {Debug mode} [dversion]] } { - set max_time 200 -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 15 - } else { - set max_time 20 - } -} - -dchrono h reset -dchrono h start - +dchrono h restart testreadstep [locate_data_file bug25424_Secure.stp] result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of testreadstep is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time of testreadstep is less than ${max_time} seconds - OK" -} +dchrono h stop counter testreadstep checkprops result -s 6998.53 checkshape result diff --git a/tests/bugs/heal/bug26871 b/tests/perf/heal/bug26871 similarity index 54% rename from tests/bugs/heal/bug26871 rename to tests/perf/heal/bug26871 index 9ad9db4250..896478d415 100644 --- a/tests/bugs/heal/bug26871 +++ b/tests/perf/heal/bug26871 @@ -13,18 +13,8 @@ set max_time 5 restore [locate_data_file bug26871_curve3d] c3d restore [locate_data_file bug26871_surface] surf -dchrono cr reset -dchrono cr start +dchrono cr restart OCC24008 c3d surf -dchrono cr stop - -set logTime [dchrono cr show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $logTime full z -if { $z > ${max_time} } { - puts "Elapsed time ($z) is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time ($z) is less than ${max_time} seconds - OK" -} +dchrono cr stop counter OCC24008 \ No newline at end of file diff --git a/tests/bugs/mesh/bug23650 b/tests/perf/mesh/bug23650 similarity index 55% rename from tests/bugs/mesh/bug23650 rename to tests/perf/mesh/bug23650 index d2ebcbd970..a38d387ffe 100644 --- a/tests/bugs/mesh/bug23650 +++ b/tests/perf/mesh/bug23650 @@ -8,24 +8,12 @@ puts "" restore [locate_data_file bug23650_slowmesh.brep] result tclean result -dchrono h reset -dchrono h start +dchrono h restart incmesh result 0.2 -dchrono h stop -set info [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time -if { $cpu_time > 5. } { - puts "Error : meshing is slow" -} else { - puts "OK: meshing is quite fast" -} +dchrono h stop counter incmesh + vinit vdisplay result vfit vsetdispmode 1 - -checkview -screenshot -3d -path ${imagedir}/${test_image}.png - - - - +checkview -screenshot -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/perf/mesh/bug24022 b/tests/perf/mesh/bug24022 new file mode 100644 index 0000000000..7c4808cef3 --- /dev/null +++ b/tests/perf/mesh/bug24022 @@ -0,0 +1,19 @@ +puts "==========" +puts "OCC24022" +puts "==========" +puts "" +##################################### +# Slow meshing in BRepMesh +##################################### + +restore [locate_data_file bug24022_hung_mesh.brep] result +tclean result +dchrono h restart +incmesh result 0.1 +dchrono h stop counter incmesh + +vinit +vdisplay result +vfit +vsetdispmode 1 +checkview -screenshot -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/perf/mesh/bug24968_1 b/tests/perf/mesh/bug24968_1 new file mode 100644 index 0000000000..ab5eb01401 --- /dev/null +++ b/tests/perf/mesh/bug24968_1 @@ -0,0 +1,22 @@ +puts "==========" +puts "OCC24968" +puts "==========" +puts "" +##################################### +# Impove BRepMesh_Classifier to cope with intersection of huge number of wires +##################################### + +cpulimit 2500 + +restore [locate_data_file bug24968_Shape_1.brep] result + +tclean result +dchrono h restart +incmesh result 0.1 +dchrono h stop counter incmesh + +vinit +vdisplay result +vfit +vsetdispmode 1 +checkview -screenshot -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/perf/mesh/bug24968_2 b/tests/perf/mesh/bug24968_2 new file mode 100644 index 0000000000..8d2c2d5a0c --- /dev/null +++ b/tests/perf/mesh/bug24968_2 @@ -0,0 +1,22 @@ +puts "==========" +puts "OCC24968" +puts "==========" +puts "" +##################################### +# Impove BRepMesh_Classifier to cope with intersection of huge number of wires +##################################### + +cpulimit 2500 + +restore [locate_data_file bug24968_Shape_1.brep] result + +tclean result +dchrono h restart +incmesh result 0.1 -parallel +dchrono h stop counter incmesh + +vinit +vdisplay result +vfit +vsetdispmode 1 +checkview -screenshot -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/mesh/bug25264 b/tests/perf/mesh/bug25264 similarity index 72% rename from tests/bugs/mesh/bug25264 rename to tests/perf/mesh/bug25264 index 8e82153dab..db9c8fc2e0 100644 --- a/tests/bugs/mesh/bug25264 +++ b/tests/perf/mesh/bug25264 @@ -10,21 +10,15 @@ restore [locate_data_file bug25264_wire.brep] w # right revol position, mesh is very fast. revol result1 w 20583.283203125 14039.0208237378 28443.2585934755 0 0 1 360 -dchrono i reset -dchrono i start +dchrono i restart incmesh result1 0.1 -dchrono i stop -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono i show] full Iseconds +dchrono i stop counter incmesh_1 # wrong revol position, mesh is very slow in occ6.7, while in occ6.2 is very fast. revol result2 w 20583.283203125 14039.0208217527 28443.25860033352 0 0 1 360 -dchrono j reset -dchrono j start +dchrono j restart incmesh result2 0.1 -dchrono j stop -regexp {CPU user time: ([0-9|.]+) seconds} [dchrono j show] full Jseconds - -checkreal "Meshing time" ${Jseconds} ${Iseconds} 0.05 0 +dchrono j stop counter incmesh_2 checkview -display result1 -3d -path ${imagedir}/${test_image}_1.png checkview -display result2 -3d -path ${imagedir}/${test_image}_2.png diff --git a/tests/bugs/mesh/bug27119 b/tests/perf/mesh/bug27119 similarity index 77% rename from tests/bugs/mesh/bug27119 rename to tests/perf/mesh/bug27119 index e36f79aed3..33ed1e17d1 100644 --- a/tests/bugs/mesh/bug27119 +++ b/tests/perf/mesh/bug27119 @@ -10,12 +10,9 @@ set BugNumber OCC27119 restore [locate_data_file bug27119_GrossPlatePart3Step2TransformedFace.brep] result -dchrono t reset -dchrono t start +dchrono t restart incmesh result 1.e-6 -dchrono t stop -set time [dchrono t show] -regexp {CPU user time: ([0-9|.]+) seconds} $time full seconds +dchrono t stop counter incmesh set tri 0 set nod 0 @@ -36,9 +33,4 @@ checkreal "Nb of triangles" $tri $ref_tri 0 $tol_rel checkreal "Nb of nodes" $nod $ref_nod 0 $tol_rel checkreal "Deflection" $def $ref_def 1.e-12 0 -set eps_time 3 -if { $seconds > $eps_time } { - puts "Error: Too slow ($seconds > $eps_time)" -} - -set 3dviewer 1 +set 3dviewer 1 \ No newline at end of file diff --git a/tests/bugs/mesh/bug27626 b/tests/perf/mesh/bug27626 old mode 100755 new mode 100644 similarity index 89% rename from tests/bugs/mesh/bug27626 rename to tests/perf/mesh/bug27626 index 2f4eb2eb02..4d90dbf925 --- a/tests/bugs/mesh/bug27626 +++ b/tests/perf/mesh/bug27626 @@ -12,8 +12,7 @@ tclean a vinit vsetdispmode 1 -dchrono h reset -dchrono h start +dchrono h restart # # DISPLAY OPERATION ----- START # @@ -21,8 +20,7 @@ vdisplay a # # DISPLAY OPERATION ----- FINISH # -dchrono h stop -dchrono h show +dchrono h stop counterv display vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/mesh/parse.rules b/tests/perf/mesh/parse.rules new file mode 100644 index 0000000000..b3cb21b22b --- /dev/null +++ b/tests/perf/mesh/parse.rules @@ -0,0 +1 @@ +FAILED /Not connected mesh inside face/ disconnected mesh diff --git a/tests/bugs/modalg_1/bug10160_1 b/tests/perf/modalg/bug10160_1 old mode 100755 new mode 100644 similarity index 61% rename from tests/bugs/modalg_1/bug10160_1 rename to tests/perf/modalg/bug10160_1 index 0a0b870f21..61f148be11 --- a/tests/bugs/modalg_1/bug10160_1 +++ b/tests/perf/modalg/bug10160_1 @@ -15,17 +15,13 @@ restore [locate_data_file OCC10160-2.brep] b2 set NbTests 3 -dchrono h0 reset -dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop -set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -35,13 +31,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time - -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcommon checkprops result -s 1.30062e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_10 b/tests/perf/modalg/bug10160_10 old mode 100755 new mode 100644 similarity index 61% rename from tests/bugs/modalg_1/bug10160_10 rename to tests/perf/modalg/bug10160_10 index fe368745b2..ea6faa33e6 --- a/tests/bugs/modalg_1/bug10160_10 +++ b/tests/perf/modalg/bug10160_10 @@ -14,14 +14,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -31,12 +29,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopfuse checkprops result -s 3.20326e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_11 b/tests/perf/modalg/bug10160_11 old mode 100755 new mode 100644 similarity index 61% rename from tests/bugs/modalg_1/bug10160_11 rename to tests/perf/modalg/bug10160_11 index ebfec15cf2..8482c85e9c --- a/tests/bugs/modalg_1/bug10160_11 +++ b/tests/perf/modalg/bug10160_11 @@ -14,14 +14,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -31,12 +29,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcut checkprops result -s 3.05154e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_12 b/tests/perf/modalg/bug10160_12 old mode 100755 new mode 100644 similarity index 61% rename from tests/bugs/modalg_1/bug10160_12 rename to tests/perf/modalg/bug10160_12 index 5364d515ec..7ca61710fc --- a/tests/bugs/modalg_1/bug10160_12 +++ b/tests/perf/modalg/bug10160_12 @@ -14,14 +14,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -31,12 +29,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter boptuc checkprops result -s 6.38359e+06 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_2 b/tests/perf/modalg/bug10160_2 old mode 100755 new mode 100644 similarity index 62% rename from tests/bugs/modalg_1/bug10160_2 rename to tests/perf/modalg/bug10160_2 index bd4cfd20ab..065231de5a --- a/tests/bugs/modalg_1/bug10160_2 +++ b/tests/perf/modalg/bug10160_2 @@ -16,14 +16,12 @@ restore [locate_data_file OCC10160-2.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -33,12 +31,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopfuse checkprops result -s 4.75218e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_3 b/tests/perf/modalg/bug10160_3 old mode 100755 new mode 100644 similarity index 62% rename from tests/bugs/modalg_1/bug10160_3 rename to tests/perf/modalg/bug10160_3 index 25667f98b4..48c8b18830 --- a/tests/bugs/modalg_1/bug10160_3 +++ b/tests/perf/modalg/bug10160_3 @@ -15,14 +15,12 @@ restore [locate_data_file OCC10160-2.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -32,12 +30,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcut checkprops result -s 2.36194e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_4 b/tests/perf/modalg/bug10160_4 old mode 100755 new mode 100644 similarity index 63% rename from tests/bugs/modalg_1/bug10160_4 rename to tests/perf/modalg/bug10160_4 index b9bed6911f..152cf3553d --- a/tests/bugs/modalg_1/bug10160_4 +++ b/tests/perf/modalg/bug10160_4 @@ -15,14 +15,12 @@ restore [locate_data_file OCC10160-2.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -32,12 +30,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter boptuc #CR24137 checkprops result -s 3.56087e+07 checkprops result -s 3.52471e+07 diff --git a/tests/bugs/modalg_1/bug10160_5 b/tests/perf/modalg/bug10160_5 old mode 100755 new mode 100644 similarity index 63% rename from tests/bugs/modalg_1/bug10160_5 rename to tests/perf/modalg/bug10160_5 index 96abfa03c4..0b9e299412 --- a/tests/bugs/modalg_1/bug10160_5 +++ b/tests/perf/modalg/bug10160_5 @@ -15,14 +15,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -32,12 +30,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcommon #CR24317 checkprops result -s 782201 checkprops result -s 784833 diff --git a/tests/bugs/modalg_1/bug10160_6 b/tests/perf/modalg/bug10160_6 old mode 100755 new mode 100644 similarity index 62% rename from tests/bugs/modalg_1/bug10160_6 rename to tests/perf/modalg/bug10160_6 index 94012db7e7..8a5ca7e799 --- a/tests/bugs/modalg_1/bug10160_6 +++ b/tests/perf/modalg/bug10160_6 @@ -15,14 +15,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -32,12 +30,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopfuse checkprops result -s 3.65961e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_7 b/tests/perf/modalg/bug10160_7 old mode 100755 new mode 100644 similarity index 62% rename from tests/bugs/modalg_1/bug10160_7 rename to tests/perf/modalg/bug10160_7 index d2bedf6330..2b24cfa961 --- a/tests/bugs/modalg_1/bug10160_7 +++ b/tests/perf/modalg/bug10160_7 @@ -16,14 +16,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -33,12 +31,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcut checkprops result -s 3.05118e+07 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_8 b/tests/perf/modalg/bug10160_8 old mode 100755 new mode 100644 similarity index 62% rename from tests/bugs/modalg_1/bug10160_8 rename to tests/perf/modalg/bug10160_8 index 76755f4683..ff6fa987d7 --- a/tests/bugs/modalg_1/bug10160_8 +++ b/tests/perf/modalg/bug10160_8 @@ -15,14 +15,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -32,12 +30,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter boptuc checkprops result -s 6.87093e+06 checkshape result diff --git a/tests/bugs/modalg_1/bug10160_9 b/tests/perf/modalg/bug10160_9 old mode 100755 new mode 100644 similarity index 61% rename from tests/bugs/modalg_1/bug10160_9 rename to tests/perf/modalg/bug10160_9 index 3a6368e845..702c6edd05 --- a/tests/bugs/modalg_1/bug10160_9 +++ b/tests/perf/modalg/bug10160_9 @@ -14,14 +14,12 @@ restore [locate_data_file OCC10160-3.brep] b2 set NbTests 3 puts "Prepare boolean operation ..." -dchrono h0 reset; dchrono h0 start +dchrono h0 restart bop b1 b2 -dchrono h0 stop; set CPU_time0_List [dchrono h0 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time0_List full CPU_user_time0 -puts "CPU_user_time0=${CPU_user_time0}" +dchrono h0 stop counter bop puts "Start boolean operation ..." -dchrono h reset; dchrono h start +dchrono h restart # # BOOLEAN OPERATION ----- START # @@ -31,12 +29,7 @@ for {set i 1} {$i <= ${NbTests}} {incr i} { # # BOOLEAN OPERATION ----- FINISH # -dchrono h stop; set CPU_time_List [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $CPU_time_List full CPU_user_time -puts "Finish boolean operation ..." -puts "CPU_user_time=${CPU_user_time}" -set CPU_user_time [expr ${CPU_user_time} / ${NbTests}] -puts "CPU_user_time=${CPU_user_time}" +dchrono h stop counter bopcommon checkprops result -s 4.86635e+06 checkshape result diff --git a/tests/bugs/modalg_1/bug165_4 b/tests/perf/modalg/bug165_4 old mode 100755 new mode 100644 similarity index 96% rename from tests/bugs/modalg_1/bug165_4 rename to tests/perf/modalg/bug165_4 index 0508ab341a..b154f41af2 --- a/tests/bugs/modalg_1/bug165_4 +++ b/tests/perf/modalg/bug165_4 @@ -9,10 +9,6 @@ puts "OCC165" puts "========" puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" - -dchrono h reset -dchrono h start - restore [locate_data_file offset_wire_019.brep] a checkshape a @@ -49,8 +45,6 @@ for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set set FinishStepOffset $stepoffset } - dchrono h show - if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { set IsBeginMade 0 set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" @@ -73,9 +67,6 @@ if {$IsGood == 1} { puts "Faulty OCC165" } -dchrono h stop -dchrono h show - renamevar result_1 result checkprops result -l 0 diff --git a/tests/bugs/modalg_1/bug165_5 b/tests/perf/modalg/bug165_5 old mode 100755 new mode 100644 similarity index 95% rename from tests/bugs/modalg_1/bug165_5 rename to tests/perf/modalg/bug165_5 index d3ea07564c..8430bea69a --- a/tests/bugs/modalg_1/bug165_5 +++ b/tests/perf/modalg/bug165_5 @@ -5,9 +5,6 @@ puts "OCC165" puts "========" puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" -dchrono h reset -dchrono h start - restore [locate_data_file offset_wire_019.brep] a checkshape a @@ -44,8 +41,6 @@ for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set set FinishStepOffset $stepoffset } - dchrono h show - if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { set IsBeginMade 0 set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" @@ -68,9 +63,6 @@ if {$IsGood == 1} { puts "Faulty OCC165" } -dchrono h stop -dchrono h show - renamevar result_1 result checkprops result -l 1081.52 diff --git a/tests/bugs/modalg_1/bug165_6 b/tests/perf/modalg/bug165_6 old mode 100755 new mode 100644 similarity index 95% rename from tests/bugs/modalg_1/bug165_6 rename to tests/perf/modalg/bug165_6 index 2cf2819a38..baed45dc99 --- a/tests/bugs/modalg_1/bug165_6 +++ b/tests/perf/modalg/bug165_6 @@ -6,10 +6,6 @@ puts "OCC165" puts "========" puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" - -dchrono h reset -dchrono h start - restore [locate_data_file offset_wire_019.brep] a checkshape a @@ -46,8 +42,6 @@ for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set set FinishStepOffset $stepoffset } - dchrono h show - if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { set IsBeginMade 0 set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" @@ -75,7 +69,4 @@ renamevar result_1 result checkprops result -l 1112.83 checkshape result checksection result -checkview -display result -2d -path ${imagedir}/${test_image}.png - -dchrono h stop -dchrono h show +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/modalg_1/bug165_7 b/tests/perf/modalg/bug165_7 old mode 100755 new mode 100644 similarity index 95% rename from tests/bugs/modalg_1/bug165_7 rename to tests/perf/modalg/bug165_7 index 21dac58bd2..1e809ed5c0 --- a/tests/bugs/modalg_1/bug165_7 +++ b/tests/perf/modalg/bug165_7 @@ -5,9 +5,6 @@ puts "OCC165" puts "========" puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)" -dchrono h reset -dchrono h start - restore [locate_data_file offset_wire_019.brep] a checkshape a @@ -44,8 +41,6 @@ for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set set FinishStepOffset $stepoffset } - dchrono h show - if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } { set IsBeginMade 0 set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n" @@ -73,7 +68,4 @@ renamevar result_1 result checkprops result -l 1113.06 checkshape result checksection result -checkview -display result -2d -path ${imagedir}/${test_image}.png - -dchrono h stop -dchrono h show +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/perf/modalg/bug19793_2 b/tests/perf/modalg/bug19793_2 new file mode 100644 index 0000000000..759cc44efc --- /dev/null +++ b/tests/perf/modalg/bug19793_2 @@ -0,0 +1,31 @@ +puts "============" +puts "OCC19793" +puts "============" +puts "" +####################################################################### +# Fuse problem of symetrical shapes. Appendix for NPAL19789 +####################################################################### + +cpulimit 2500 +set BugNumber OCC19793 + +puts "Load first shape ..." +restore [locate_data_file bug19793_new_shape.brep] b1 +puts "Load second shape ..." +restore [locate_data_file bug19793_shape.brep] b2 + +puts "Prepare boolean operation ..." +dchrono perf_h restart +bop b1 b2 +dchrono perf_h stop counter bop + +puts "Start boolean operation ..." +bopsection result +puts "Finish boolean operation ..." + +checkprops result -l 17730.1 +checkshape result +checksection result +checknbshapes result -vertex 68 -edge 70 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 139 + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug23906 b/tests/perf/modalg/bug23906 new file mode 100644 index 0000000000..9df38743fc --- /dev/null +++ b/tests/perf/modalg/bug23906 @@ -0,0 +1,17 @@ +puts "============" +puts "OCC23906" +puts "============" +puts "" +############################### +## Performance of the projection algorithm in some cases became lower after integration of the fix for the bug 0022610 +############################### + +restore [locate_data_file bug23906_f.brep] f + +point p 3.5527136788005e-015 100 100 + +dchrono h restart + +projponf f p -min -t + +dchrono h stop counter projponf \ No newline at end of file diff --git a/tests/bugs/modalg_5/bug24005 b/tests/perf/modalg/bug24005 old mode 100755 new mode 100644 similarity index 53% rename from tests/bugs/modalg_5/bug24005 rename to tests/perf/modalg/bug24005 index 21f84747c6..b6aad5d352 --- a/tests/bugs/modalg_5/bug24005 +++ b/tests/perf/modalg/bug24005 @@ -8,23 +8,11 @@ puts "" pload QAcommands -dchrono h reset -dchrono h start +dchrono h restart OCC24005 result -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -set max_time 0.4 -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} +dchrono h stop counter OCC24005 if { [regexp {Ellipse} [dump result]] == 1 } { puts "result is OK" diff --git a/tests/perf/modalg/bug24696 b/tests/perf/modalg/bug24696 new file mode 100644 index 0000000000..3701de4afb --- /dev/null +++ b/tests/perf/modalg/bug24696 @@ -0,0 +1,26 @@ +puts "=========" +puts "OCC24696" +puts "=========" +puts "" +########################################################### +# Lower performance of the new Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24751_1 b/tests/perf/modalg/bug24751_1 new file mode 100644 index 0000000000..41c61ac1cd --- /dev/null +++ b/tests/perf/modalg/bug24751_1 @@ -0,0 +1,30 @@ +puts "=========" +puts "OCC24751" +puts "=========" +puts "" +########################################################### +# Performance improvements in the Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +###------------------#### +trotate cx 0 0 0 0 0 1 45 +###------------------#### + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24751_2 b/tests/perf/modalg/bug24751_2 new file mode 100644 index 0000000000..0fff551f54 --- /dev/null +++ b/tests/perf/modalg/bug24751_2 @@ -0,0 +1,30 @@ +puts "=========" +puts "OCC24751" +puts "=========" +puts "" +########################################################### +# Performance improvements in the Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +###------------------#### +trotate cx 0 0 0 0 1 1 45 +###------------------#### + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24751_3 b/tests/perf/modalg/bug24751_3 new file mode 100644 index 0000000000..7c9938d9cf --- /dev/null +++ b/tests/perf/modalg/bug24751_3 @@ -0,0 +1,30 @@ +puts "=========" +puts "OCC24751" +puts "=========" +puts "" +########################################################### +# Performance improvements in the Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +###------------------#### +trotate cx 0 0 0 1 1 1 45 +###------------------#### + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24751_4 b/tests/perf/modalg/bug24751_4 new file mode 100644 index 0000000000..e6d11c905a --- /dev/null +++ b/tests/perf/modalg/bug24751_4 @@ -0,0 +1,30 @@ +puts "=========" +puts "OCC24751" +puts "=========" +puts "" +########################################################### +# Performance improvements in the Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +###------------------#### +trotate cx 0 0 0 0 1 1 90 +###------------------#### + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug24751_5 b/tests/perf/modalg/bug24751_5 new file mode 100644 index 0000000000..9d882d69c1 --- /dev/null +++ b/tests/perf/modalg/bug24751_5 @@ -0,0 +1,30 @@ +puts "=========" +puts "OCC24751" +puts "=========" +puts "" +########################################################### +# Performance improvements in the Edge/Edge intersection algorithm +########################################################### + +pload QAcommands + +dchrono h restart + +restore [locate_data_file bug24696_cx_e1200_nurbs.brep] cx + +###------------------#### +trotate cx 0 0 0 1 1 1 90 +###------------------#### + +bclearobjects +bcleartools + +set edges [explode cx e] +set nbe [llength $edges] +for {set i 1} {$i <= $nbe} {incr i} {baddobjects cx_$i} +bfillds +bbuild result + +dchrono h stop counter EdgeIntersection + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_5/bug24899 b/tests/perf/modalg/bug24899 similarity index 51% rename from tests/bugs/modalg_5/bug24899 rename to tests/perf/modalg/bug24899 index b71f27a0e0..894fccc7ad 100644 --- a/tests/bugs/modalg_5/bug24899 +++ b/tests/perf/modalg/bug24899 @@ -14,31 +14,14 @@ mkcurve c1 l_1 BRepIntCS c1 h1 r distmini dd l_1 h1 -dchrono t1 reset -dchrono t1 start - +dchrono t1 restart for { set i 0} { $i <= 100 } {incr i} { BRepIntCS c1 h1 r } +dchrono t1 stop counter BRepIntCS -dchrono t1 stop -set time1 [dchrono t1 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $time1 full timeint -puts "Time performing BRepIntCurveSurface = $timeint" - -dchrono t2 reset -dchrono t2 start +dchrono t2 restart for { set j 0} { $j <= 100 } {incr j} { distmini dd l_1 h1 } - -dchrono t2 stop -set time2 [dchrono t2 show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $time2 full timeextr -puts "Time performing BRepExtrema_DistShapeShape = $timeextr" - -if { $timeint > 2 * $timeextr } { - puts "Error : Time of intersection of curve with shell is more than two time from BRepExtrema" -} else { - puts "OK: Time is good" -} +dchrono t2 stop counter distmini \ No newline at end of file diff --git a/tests/perf/modalg/bug25019 b/tests/perf/modalg/bug25019 new file mode 100644 index 0000000000..9a1bb536f6 --- /dev/null +++ b/tests/perf/modalg/bug25019 @@ -0,0 +1,20 @@ +puts "============" +puts "OCC25019" +puts "============" +puts "" +############################### +## Command "bsection" in Test Harness with flag build pcurve on second shape works slowly. +############################### + +restore [locate_data_file bug25019_a_shape_1.brep] a1 +restore [locate_data_file bug25019_prism.brep] p1 + +# 1. +dchrono h1 restart +bsection r a1 p1 -n2d2 +dchrono h1 stop counter BSectionN2D2 + +# 2. +dchrono h2 restart +bsection r a1 p1 +dchrono h2 stop counter BSection \ No newline at end of file diff --git a/tests/perf/modalg/bug25058 b/tests/perf/modalg/bug25058 new file mode 100644 index 0000000000..f0024ee55a --- /dev/null +++ b/tests/perf/modalg/bug25058 @@ -0,0 +1,14 @@ +puts "============" +puts "OCC25058" +puts "============" +puts "" +############################### +## Regression of performance of BRepExtrema_ExtCC (1000 times slower) +############################### + +restore [locate_data_file bug25058_e1.brep] e1 +restore [locate_data_file bug25058_e2.brep] e2 + +dchrono h restart +distmini r e1 e2 +dchrono h stop counter distmini \ No newline at end of file diff --git a/tests/perf/modalg/bug25413 b/tests/perf/modalg/bug25413 new file mode 100644 index 0000000000..e78533f3be --- /dev/null +++ b/tests/perf/modalg/bug25413 @@ -0,0 +1,15 @@ +puts "========" +puts "OCC25413" +puts "========" +puts "" +############################################################# +# Line-Shape intersection algorithm became 400 times slower +############################################################# + +pload QAcommands + +restore [locate_data_file bug25413.brep] w + +dchrono perf_h restart +OCC25413 w +dchrono perf_h stop counter OCC25413 \ No newline at end of file diff --git a/tests/bugs/modalg_5/bug25742_1 b/tests/perf/modalg/bug25742_1 old mode 100755 new mode 100644 similarity index 56% rename from tests/bugs/modalg_5/bug25742_1 rename to tests/perf/modalg/bug25742_1 index d4447f47d6..c39337b673 --- a/tests/bugs/modalg_5/bug25742_1 +++ b/tests/perf/modalg/bug25742_1 @@ -6,20 +6,6 @@ puts "" ## A partition of 2 shapes stresses a performance issue ############################### -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 150 - } else { - set max_time 100 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 30 - } else { - set max_time 20 - } -} - restore [locate_data_file bug25742_pipeFiss.brep] b1 restore [locate_data_file bug25742_shellFiss.brep] b2 @@ -28,23 +14,10 @@ bcleartools baddobjects b1 baddtools b2 -dchrono h reset -dchrono h start - +dchrono h restart bfillds bbuild result - -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of bbuild is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time of bbuild is less than ${max_time} seconds - OK" -} +dchrono h stop counter BBuild checkprops result -s 280627 checkshape result diff --git a/tests/bugs/modalg_5/bug25742_2 b/tests/perf/modalg/bug25742_2 similarity index 61% rename from tests/bugs/modalg_5/bug25742_2 rename to tests/perf/modalg/bug25742_2 index 6dad90a0a2..f636f2683c 100755 --- a/tests/bugs/modalg_5/bug25742_2 +++ b/tests/perf/modalg/bug25742_2 @@ -35,46 +35,18 @@ donly b1_4 fit display b2_1 -dchrono h reset -dchrono h start - +dchrono h restart bopcurves b1_4 b2_1 -2d - -dchrono h stop +dchrono h stop bopcurves counter bopcurves checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of bopcurves is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time of bopcurves is less than ${max_time} seconds - OK" -} - - mksurface s1 b1_4 mksurface s2 b2_1 -dchrono h2 reset -dchrono h2 start - +dchrono h2 restart set CurveNumb [intersect resi s1 s2] - -dchrono h2 stop -set q2 [dchrono h2 show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" - -if { $z2 > ${max_time2} } { - puts "Elapsed time of intersect is more than ${max_time2} seconds - Faulty" -} else { - puts "Elapsed time of intersect is less than ${max_time2} seconds - OK" -} +dchrono h2 stop counter CurveNumb if { [llength ${CurveNumb}] < 1 } { puts "Error : Bad intersection" diff --git a/tests/bugs/modalg_5/bug25788 b/tests/perf/modalg/bug25788 similarity index 55% rename from tests/bugs/modalg_5/bug25788 rename to tests/perf/modalg/bug25788 index 465299e298..1f94bd1328 100644 --- a/tests/bugs/modalg_5/bug25788 +++ b/tests/perf/modalg/bug25788 @@ -31,31 +31,6 @@ baddtools b2 brunparallel 1 -dchrono cpu reset -dchrono cpu start +dchrono cpu restart bcut r b1 b2 -dchrono cpu stop -set chrono_info [dchrono cpu show] - -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 200 - } else { - set max_time 200 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 50 - } else { - set max_time 50 - } -} - -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${chrono_info} full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} +dchrono cpu stop counter bcut \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26310_1 b/tests/perf/modalg/bug26310_1 similarity index 67% rename from tests/bugs/modalg_6/bug26310_1 rename to tests/perf/modalg/bug26310_1 index 394cfad094..826d18203b 100644 --- a/tests/bugs/modalg_6/bug26310_1 +++ b/tests/perf/modalg/bug26310_1 @@ -20,25 +20,13 @@ restore [locate_data_file OCC26310-b2.brep] b2 explode b1 f explode b2 f -dchrono cr reset -dchrono cr start +dchrono cr restart set log1 [bopcurves b1_1 b2_1 -2d] -dchrono cr stop +dchrono cr stop counter bopcurves regexp {Tolerance Reached=+([-0-9.+eE]+)} ${log1} full Toler - puts "TolReached = $Toler" if { $Toler > $maxToler } { puts "Error: Tolerance is too big ($Toler > $maxToler)" -} - -set log2 [dchrono cr show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $log2 full sec - -if { $sec > ${max_time} } { - puts "Error: CPU user time is more than ${max_time} seconds" -} else { - puts "OK: CPU user time is less than ${max_time} seconds" -} +} \ No newline at end of file diff --git a/tests/perf/modalg/bug26327 b/tests/perf/modalg/bug26327 new file mode 100644 index 0000000000..5d8380cc9d --- /dev/null +++ b/tests/perf/modalg/bug26327 @@ -0,0 +1,20 @@ +puts "============" +puts "OCC24596" +puts "============" +puts "" +############################### +## Slow import of IGES data +############################### + +pload XDE + +dchrono h restart + +stepread [locate_data_file bug26327_fuse_input.stp] a * + +for {set i 2} {$i < 22} {incr i} { + puts "a_$i" + bfuse a_1 a_1 a_$i + } + +dchrono h stop counter stepread \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26443_1 b/tests/perf/modalg/bug26443_1 similarity index 82% rename from tests/bugs/modalg_6/bug26443_1 rename to tests/perf/modalg/bug26443_1 index 2c0aa5de1c..975b74607d 100644 --- a/tests/bugs/modalg_6/bug26443_1 +++ b/tests/perf/modalg/bug26443_1 @@ -10,11 +10,9 @@ smallview restore [locate_data_file OCC26443-shell_1.brep] a -chrono h reset -dchrono h start +dchrono h restart offsetshape r a -2 -chrono h stop -dchrono h show +dchrono h stop counter offsetshape fit checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_6/bug26443_2 b/tests/perf/modalg/bug26443_2 similarity index 82% rename from tests/bugs/modalg_6/bug26443_2 rename to tests/perf/modalg/bug26443_2 index 94f78db732..d98d576fd2 100644 --- a/tests/bugs/modalg_6/bug26443_2 +++ b/tests/perf/modalg/bug26443_2 @@ -10,11 +10,9 @@ smallview restore [locate_data_file OCC26443-shell_2.brep] a -chrono h reset -dchrono h start +dchrono h restart offsetshape r a -2 -chrono h stop -dchrono h show +dchrono h stop counter offsetshape fit checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug26447 b/tests/perf/modalg/bug26447 new file mode 100644 index 0000000000..8437b172b8 --- /dev/null +++ b/tests/perf/modalg/bug26447 @@ -0,0 +1,20 @@ +puts "============" +puts "OCC26447" +puts "============" +puts "" +############################################################## +# Performance degradation intersecting cylindrical surfaces +############################################################# + +cylinder c1 0 0 0 1 0 0 0 -1 0 100 +cylinder c2 0 0 0 0 1 0 1 0 0 100 +mkface f1 c1 +mkface f2 c2 + +dchrono cr restart + +for {set i 1} {$i <= 1000} {incr i} { + bopcurves f1 f2 +} + +dchrono cr stop counter bopcurves \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26513 b/tests/perf/modalg/bug26513 similarity index 100% rename from tests/bugs/modalg_6/bug26513 rename to tests/perf/modalg/bug26513 diff --git a/tests/bugs/modalg_6/bug26674 b/tests/perf/modalg/bug26674 similarity index 61% rename from tests/bugs/modalg_6/bug26674 rename to tests/perf/modalg/bug26674 index 7fa68135d1..d9ede812a3 100644 --- a/tests/bugs/modalg_6/bug26674 +++ b/tests/perf/modalg/bug26674 @@ -11,23 +11,9 @@ set max_time 1 restore [locate_data_file OCC26674-face.brep] a1 restore [locate_data_file OCC26674-shell.brep] a2 -dchrono cr reset -dchrono cr start - +dchrono cr restart distmini dd a1 a2 - -dchrono cr stop - -set log [dchrono cr show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $log full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of BRepExtrema_DistShapeShape is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time of BRepExtrema_DistShapeShape is less than ${max_time} seconds - OK" -} +dchrono cr stop counter distmini regexp {([-0-9.+eE]+)$} [dump dd_val] full dist diff --git a/tests/perf/modalg/bug26914 b/tests/perf/modalg/bug26914 new file mode 100644 index 0000000000..9602c20b60 --- /dev/null +++ b/tests/perf/modalg/bug26914 @@ -0,0 +1,15 @@ +puts "========" +puts "OCC26914" +puts "========" +puts "" +################################# +# Hang in surface approximation +################################# + +set max_time 2 + +restore [locate_data_file bug23943_s.draw] s + +dchrono cr restart +approxsurf rs s 5e-5 0 0 15 15 100 0 +dchrono cr stop counter approxsurf \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug26929 b/tests/perf/modalg/bug26929 similarity index 62% rename from tests/bugs/modalg_6/bug26929 rename to tests/perf/modalg/bug26929 index b89413a27e..342f9e66b1 100644 --- a/tests/bugs/modalg_6/bug26929 +++ b/tests/perf/modalg/bug26929 @@ -13,25 +13,13 @@ restore [locate_data_file OCC26629-edge.brep] aE pload MODELING # Hang check. -dchrono cr reset -dchrono cr start +dchrono cr restart set ss "" foreach s [explode aE e] {set ss "$ss aF $s"} eval splitshape result aF $ss -dchrono cr stop - -set max_time 20.0 -set log [dchrono cr show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $log full z - - -if { $z > ${max_time} } { - puts "Elapsed time of BRepFeat_SplitShape is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time of BRepFeat_SplitShape is less than ${max_time} seconds - OK" -} +dchrono cr stop counter splitshape # Check result validity. checkshape result diff --git a/tests/bugs/modalg_6/bug26980 b/tests/perf/modalg/bug26980 similarity index 70% rename from tests/bugs/modalg_6/bug26980 rename to tests/perf/modalg/bug26980 index 5066a6e3f2..997bce58ee 100644 --- a/tests/bugs/modalg_6/bug26980 +++ b/tests/perf/modalg/bug26980 @@ -19,13 +19,12 @@ puts [nbshapes cmp -t] eval baddobjects [explode cmp] -dchrono cr reset -dchrono cr start +dchrono cr restart bfillds bbuild result -dchrono cr stop +dchrono cr stop counter bbuild set mem_wsetpeak [meminfo wsetpeak] @@ -33,14 +32,6 @@ if { ${mem_wsetpeak} > ${mem_max_wsetpeak}} { puts "Error : there is memory problem (${mem_wsetpeak} MBytes has been allocated)" } -set chrono_info [dchrono cr show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time -if { $CPU_time > ${max_time} } { - puts "CPU user time of Boolean operation is more than ${max_time} seconds - Error" -} else { - puts "CPU user time of Boolean operation is less than ${max_time} seconds - OK" -} - set nbshapes_expected " VERTEX : 365 EDGE : 793 diff --git a/tests/perf/modalg/bug27085_1 b/tests/perf/modalg/bug27085_1 new file mode 100644 index 0000000000..2bfd02a92e --- /dev/null +++ b/tests/perf/modalg/bug27085_1 @@ -0,0 +1,15 @@ +puts "============" +puts "OCC27085" +puts "============" +puts "" +############################### +## ShapeUpgrade_UnifySameDomain very large performance difference for seemingly similar shapes +############################### + +restore [locate_data_file bug27085_fused_primitive.fast.brep] fp + +dchrono h restart + +unifysamedom res fp + +dchrono h stop counter unifysamedom \ No newline at end of file diff --git a/tests/perf/modalg/bug27085_2 b/tests/perf/modalg/bug27085_2 new file mode 100644 index 0000000000..16c6f80a03 --- /dev/null +++ b/tests/perf/modalg/bug27085_2 @@ -0,0 +1,15 @@ +puts "============" +puts "OCC27085" +puts "============" +puts "" +############################### +## ShapeUpgrade_UnifySameDomain very large performance difference for seemingly similar shapes +############################### + +restore [locate_data_file bug27085_fused_primitive.slow.brep] sp + +dchrono h restart + +unifysamedom res sp + +dchrono h stop counter unifysamedom \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug27569 b/tests/perf/modalg/bug27569 similarity index 51% rename from tests/bugs/modalg_6/bug27569 rename to tests/perf/modalg/bug27569 index ece3f66972..7ea84ca3a0 100644 --- a/tests/bugs/modalg_6/bug27569 +++ b/tests/perf/modalg/bug27569 @@ -14,15 +14,6 @@ mkcurve c aS_1 mksurface s aS_2 # Performance check -chrono h reset; chrono h start -OCC24008 c s; -chrono h stop; set q [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full aTime - -set MAX_TIME 1.0 - -if { $aTime > ${MAX_TIME} } { - puts "Elapsed time is more than ${MAX_TIME} seconds - Faulty" -} else { - puts "Elapsed time is less than ${MAX_TIME} seconds - OK" -} +dchrono h restart +OCC24008 c s +dchrono h stop counter OCC24008 \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug28030 b/tests/perf/modalg/bug28030 similarity index 59% rename from tests/bugs/modalg_6/bug28030 rename to tests/perf/modalg/bug28030 index 4031c2f6d6..ec45653012 100644 --- a/tests/bugs/modalg_6/bug28030 +++ b/tests/perf/modalg/bug28030 @@ -14,13 +14,9 @@ repeat 98 {insertknot c1 0.01*$i 1; incr i 1} mkedge e1 c1 prism p1 e1 0 0 1 explode p1 e -dchrono cpu reset -dchrono cpu start +dchrono cpu restart xdistef p1_3 p1 -dchrono cpu stop -puts [dchrono cpu show] -set q1 [dchrono cpu show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${q1} full t1 +dchrono cpu stop counter xdistef_1 convert c2 c set i 1 @@ -28,17 +24,6 @@ repeat 1000 {insertknot c2 0.00098*$i 1; incr i 1} mkedge e2 c2 prism p2 e2 0 0 1 explode p2 e -dchrono cpu reset -dchrono cpu start +dchrono cpu restart xdistef p2_3 p2 -dchrono cpu stop -puts [dchrono cpu show] -set q2 [dchrono cpu show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} ${q2} full t2 - -set max_ratio 5 -if { ${t2} > ${max_ratio}*${t1} } { - puts "Elapsed time is too much - Faulty" -} else { - puts "Elapsed time is OK" -} +dchrono cpu stop counter xdistef_2 diff --git a/tests/perf/modalg/bug452_1 b/tests/perf/modalg/bug452_1 new file mode 100644 index 0000000000..f532b58265 --- /dev/null +++ b/tests/perf/modalg/bug452_1 @@ -0,0 +1,22 @@ + +puts "========" +puts "OCC452" +puts "(case 1)" +puts "========" +puts "" + +pcone pc 10 0 20 +explode pc f + +prism pcy pc_2 0 0 10 + +dchrono h2 restart + +bcut result pc pcy + +dchrono h2 stop counter bcut + +checkprops result -s 254.16 +checkshape result +checkview -display result -2d -path ${imagedir}/${test_image}.png + diff --git a/tests/bugs/modalg_2/bug452_2 b/tests/perf/modalg/bug452_2 old mode 100755 new mode 100644 similarity index 80% rename from tests/bugs/modalg_2/bug452_2 rename to tests/perf/modalg/bug452_2 index 15603c0ede..986ed6bfe0 --- a/tests/bugs/modalg_2/bug452_2 +++ b/tests/perf/modalg/bug452_2 @@ -37,23 +37,15 @@ if { [regexp {Faulty} $che ] == 1 } { } else { puts "OCC452 OK (shape 4): Source shape is valid" } -dchrono h2 reset -dchrono h2 start +dchrono h2 restart bfuse r a b #checkshape r bfuse result c d -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 60 } { - puts "Elapsed time is more then 60 seconds - Faulty" -} else { - puts "Elapsed time is less then 60 seconds - OK" -} +dchrono h2 stop counter bfuse + checkprops result -s 3468.6 checkshape result checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug452_3 b/tests/perf/modalg/bug452_3 old mode 100755 new mode 100644 similarity index 71% rename from tests/bugs/modalg_2/bug452_3 rename to tests/perf/modalg/bug452_3 index 5ca95cc551..9f34fb5b05 --- a/tests/bugs/modalg_2/bug452_3 +++ b/tests/perf/modalg/bug452_3 @@ -22,21 +22,13 @@ if { [regexp {Faulty} $che ] == 1 } { puts "OCC452 OK (shape 6): Source shape is valid" } -dchrono h2 reset -dchrono h2 start +dchrono h2 restart bfuse result a b #checkshape -top res -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 50 } { - puts "Elapsed time is more then 50 seconds - Faulty" -} else { - puts "Elapsed time is less then 50 seconds - OK" -} +dchrono h2 stop counter bfuse + checkprops result -s 3468.6 checkshape result checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug452_4 b/tests/perf/modalg/bug452_4 old mode 100755 new mode 100644 similarity index 71% rename from tests/bugs/modalg_2/bug452_4 rename to tests/perf/modalg/bug452_4 index 65ea0e11c7..06a2816b95 --- a/tests/bugs/modalg_2/bug452_4 +++ b/tests/perf/modalg/bug452_4 @@ -22,21 +22,13 @@ if { [regexp {Faulty} $che ] == 1 } { puts "OCC452 OK (shape 8): Source shape is valid" } -dchrono h2 reset -dchrono h2 start +dchrono h2 restart bfuse result a b #checkshape -top res -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 5 } { - puts "Elapsed time is more then 5 seconds - Faulty" -} else { - puts "Elapsed time is less then 5 seconds - OK" -} +dchrono h2 stop counter bfuse + checkprops result -s 201978 checkshape result checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug453_1 b/tests/perf/modalg/bug453_1 old mode 100755 new mode 100644 similarity index 64% rename from tests/bugs/modalg_2/bug453_1 rename to tests/perf/modalg/bug453_1 index d2aa64c8a1..82b70d1541 --- a/tests/bugs/modalg_2/bug453_1 +++ b/tests/perf/modalg/bug453_1 @@ -7,8 +7,7 @@ puts "(case 1)" puts "========" puts "" -dchrono h2 reset -dchrono h2 start +dchrono h2 restart set make_print_out 0 @@ -24,15 +23,8 @@ blend result s 0.5*SCALE1 s_1 0.5*SCALE1 s_4 0.5*SCALE1 s_12 0.5*SCALE1 s_8 0.5* explode result sh tcopy result_1 result -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 50 } { - puts "Elapsed time is more then 50 seconds - Faulty" -} else { - puts "Elapsed time is less then 50 seconds - OK" -} +dchrono h2 stop counter blend + checkprops result -s 6021.51 checkshape result checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug453_2 b/tests/perf/modalg/bug453_2 new file mode 100644 index 0000000000..3ea921a5f4 --- /dev/null +++ b/tests/perf/modalg/bug453_2 @@ -0,0 +1,31 @@ +puts "TODO ?OCC25918 Windows: Error : The area of result shape is" +puts "TODO OCC24156 MacOS: Tcl Exception:" +puts "TODO OCC24156 MacOS: TEST INCOMPLETE" + +puts "========" +puts "OCC453" +puts "(case 2)" +puts "========" +puts "" + +dchrono h2 restart + +set make_print_out 0 + +dset SCALE 1000. +dset SCALE1 5 +tolblend 0.01 1e-04 1e-05 1e-03 + +restore [locate_data_file shading_137.brep] s +tscale s 0 0 0 SCALE1 +explode s E + +blend result s 4.5*SCALE1 s_2 4.5*SCALE1 s_1 4.5*SCALE1 s_6 4.5*SCALE1 s_8 4.5*SCALE1 s_10 4.5*SCALE1 s_14 4.5*SCALE1 s_4 4.5*SCALE1 s_5 4.5*SCALE1 s_16 4.5*SCALE1 s_11 4.5*SCALE1 s_19 4.5*SCALE1 s_13 +explode result So +tcopy result_1 result + +dchrono h2 stop counter blend + +checkprops result -s 3.65777e+06 +checkshape result +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug5157_1 b/tests/perf/modalg/bug5157_1 old mode 100755 new mode 100644 similarity index 94% rename from tests/bugs/modalg_2/bug5157_1 rename to tests/perf/modalg/bug5157_1 index 80480a06be..bbac9e7d13 --- a/tests/bugs/modalg_2/bug5157_1 +++ b/tests/perf/modalg/bug5157_1 @@ -7,7 +7,6 @@ puts "" ###################################################### cpulimit 3500 -#dchrono h reset; dchrono h start catch { pload XDE } diff --git a/tests/bugs/modalg_2/bug5157_2 b/tests/perf/modalg/bug5157_2 old mode 100755 new mode 100644 similarity index 94% rename from tests/bugs/modalg_2/bug5157_2 rename to tests/perf/modalg/bug5157_2 index e9de1dd636..e0758b0559 --- a/tests/bugs/modalg_2/bug5157_2 +++ b/tests/perf/modalg/bug5157_2 @@ -7,7 +7,6 @@ puts "" ###################################################### cpulimit 3500 -#dchrono h reset; dchrono h start catch { pload XDE } diff --git a/tests/bugs/modalg_4/bug83_1 b/tests/perf/modalg/bug83_1 old mode 100755 new mode 100644 similarity index 54% rename from tests/bugs/modalg_4/bug83_1 rename to tests/perf/modalg/bug83_1 index 14a64dcc82..984a5d3c65 --- a/tests/bugs/modalg_4/bug83_1 +++ b/tests/perf/modalg/bug83_1 @@ -18,19 +18,10 @@ renamevar c_2 pr plane f 0 0 0 1 0 0 mkface f f -11 11 -11 11 -dchrono h reset -dchrono h start +dchrono h restart bsection result f pr -dchrono h stop -set q2 [dchrono h show] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z -puts "$z" -if { $z > 5 } { - puts "Elapsed time is more then 5 seconds - Faulty" -} else { - puts "Elapsed time is less then 5 - OK" -} +dchrono h stop counter bsection checkprops result -l 42.879 checkshape result diff --git a/tests/bugs/modalg_4/bug83_2 b/tests/perf/modalg/bug83_2 old mode 100755 new mode 100644 similarity index 67% rename from tests/bugs/modalg_4/bug83_2 rename to tests/perf/modalg/bug83_2 index f24d81251a..0700f8897f --- a/tests/bugs/modalg_4/bug83_2 +++ b/tests/perf/modalg/bug83_2 @@ -19,18 +19,10 @@ plane f 0 0 0 1 0 0 mkface f f -11 11 -11 11 puts "Info: perform section with planar BSpline surface" -dchrono h2 reset -dchrono h2 start +dchrono h2 restart bsection result sh pr -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 40 } { - puts "Elapsed time is more then 40 seconds - Faulty" -} else { - puts "Elapsed time is less then 40 - OK" -} +dchrono h2 stop counter bsection + checkprops result -l 42.879 checkshape result checksection result diff --git a/tests/perf/moddata/bug21292 b/tests/perf/moddata/bug21292 new file mode 100644 index 0000000000..dc4c166fe6 --- /dev/null +++ b/tests/perf/moddata/bug21292 @@ -0,0 +1,32 @@ +puts "========" +puts "OCC21292" +puts "========" +puts "" +###################################################### +# Shading on large model too long +###################################################### + +set BugNumber OCC21292 + +# 1 munite +cpulimit 60 + +restore [locate_data_file OCC21292.brep] result + +vinit +vsetdispmode 1 + +dchrono h restart +# +# DISPLAY OPERATION ----- START +# +vdisplay result +# +# DISPLAY OPERATION ----- FINISH +# +dchrono h stop counter vdisplay + +checkprops result -s 1.40193e+07 +checknbshapes result -vertex 372 -edge 369 -wire 2 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 745 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/moddata/bug21858 b/tests/perf/moddata/bug21858 new file mode 100644 index 0000000000..77bb107a8f --- /dev/null +++ b/tests/perf/moddata/bug21858 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC21858" +puts "============" +puts "" +#################################### +# Visualization hangs on this face ( OCC21858.brep ) +#################################### + +set BugNumber OCC21858 +cpulimit 40 +restore [locate_data_file OCC21858.brep] result + +checkprops result -l 6.48642 +checksection result + +checknbshapes result -vertex 9 -edge 10 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 21 + +vinit +vsetdispmode 1 +dchrono TestTimer restart +vdisplay result +dchrono TestTimer stop counter vdisplay +vfit + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/moddata/bug25487_1 b/tests/perf/moddata/bug25487_1 new file mode 100644 index 0000000000..fd62e6caa9 --- /dev/null +++ b/tests/perf/moddata/bug25487_1 @@ -0,0 +1,14 @@ +puts "========" +puts "OCC25487" +puts "========" +puts "" +########################################## +# Extrema_GenExtPS needs to be optimized +########################################## + +pload DATAEXCHANGEKERNEL + +# Restore testing shape and get timing characteristics for operation stepread +dchrono perf_h restart +stepread [locate_data_file OCC25487_LP1.stp] a * +dchrono perf_h stop counter stepread \ No newline at end of file diff --git a/tests/perf/moddata/bug25487_2 b/tests/perf/moddata/bug25487_2 new file mode 100644 index 0000000000..c0a648f9b0 --- /dev/null +++ b/tests/perf/moddata/bug25487_2 @@ -0,0 +1,16 @@ +puts "========" +puts "OCC25487" +puts "========" +puts "" +########################################## +# Extrema_GenExtPS needs to be optimized +########################################## + +cpulimit 1500 + +pload DATAEXCHANGEKERNEL + +# Restore testing shape and get timing characteristics for operation stepread +dchrono perf_h restart +stepread [locate_data_file OCC25487_LP2.stp] a * +dchrono perf_h stop counter stepread \ No newline at end of file diff --git a/tests/bugs/moddata_3/bug26339 b/tests/perf/moddata/bug26339 similarity index 59% rename from tests/bugs/moddata_3/bug26339 rename to tests/perf/moddata/bug26339 index 309bf5dfb9..267a1f5d98 100644 --- a/tests/bugs/moddata_3/bug26339 +++ b/tests/perf/moddata/bug26339 @@ -22,19 +22,8 @@ if { [regexp {Debug mode} [dversion]] } { restore [locate_data_file bug26339_a_1886.brep] f -dchrono h reset -dchrono h start +dchrono h restart fixshape r f 1e-5 -dchrono h stop -set q [dchrono h show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time of projecting a curve is more than ${max_time} seconds - Faulty" -} else { - puts "Elapsed time of projecting a curve is less than ${max_time} seconds - OK" -} +dchrono h stop counter fixshape \ No newline at end of file diff --git a/tests/bugs/moddata_3/bug26884 b/tests/perf/moddata/bug26884 similarity index 61% rename from tests/bugs/moddata_3/bug26884 rename to tests/perf/moddata/bug26884 index 6bb33bb3d9..bffec62d13 100644 --- a/tests/bugs/moddata_3/bug26884 +++ b/tests/perf/moddata/bug26884 @@ -11,24 +11,13 @@ set max_time 0.1 restore [locate_data_file bug26884-f1.brep] f1 restore [locate_data_file bug26884-f2.brep] f2 -dchrono cr reset -dchrono cr start +dchrono cr restart set info [bopcurves f1 f2 -2d] -dchrono cr stop +dchrono cr stop counter bopcurves if {![regexp {has no 3d curves} $info] || ![regexp {has no 3d points} $info] } { puts "Error: wrong output" -} - -set logTime [dchrono cr show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $logTime full z - -if { $z > ${max_time} } { - puts "Elapsed time ($z) is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time ($z) is less than ${max_time} seconds - OK" -} +} \ No newline at end of file diff --git a/tests/bugs/moddata_3/bug27048_1 b/tests/perf/moddata/bug27048_1 similarity index 69% rename from tests/bugs/moddata_3/bug27048_1 rename to tests/perf/moddata/bug27048_1 index 4bfe0e159a..b9d863e590 100644 --- a/tests/bugs/moddata_3/bug27048_1 +++ b/tests/perf/moddata/bug27048_1 @@ -18,17 +18,6 @@ bsplinesurf surf \ 0 8 0 1 2 8 0 1 4 8 15 1 6 8 15 1 7 7 0 1 10 8 0 1 \ 0 10 0 1 2 10 0 1 4 10 15 1 6 10 15 1 7 10 0 1 10 10 0 1 -dchrono t reset -dchrono t start +dchrono t restart OCC27048 surf -0.1 -0.1 1000000 -dchrono t stop -set elapsed [dchrono t show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $elapsed full cpu_time -set max_time 1 - -if { $cpu_time > ${max_time} } { - puts "Error: calculating B-spline value takes too long time (greater than ${max_time} sec)" -} else { - puts "OK: performance calculating B-spline is suitable" -} +dchrono t stop counter OCC27048 \ No newline at end of file diff --git a/tests/bugs/moddata_3/bug27048_2 b/tests/perf/moddata/bug27048_2 similarity index 54% rename from tests/bugs/moddata_3/bug27048_2 rename to tests/perf/moddata/bug27048_2 index 6a9840cfe0..386b3fd011 100644 --- a/tests/bugs/moddata_3/bug27048_2 +++ b/tests/perf/moddata/bug27048_2 @@ -8,20 +8,9 @@ puts "" pload XSDRAW -dchrono t reset -dchrono t start +dchrono t restart testreadstep [locate_data_file bug27048.stp] result -dchrono t stop -set elapsed [dchrono t show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $elapsed full cpu_time -set max_time 40 - -if { $cpu_time > ${max_time} } { - puts "Error: reading document Doc is too long (greater than ${max_time} sec)" -} else { - puts "OK: performance reading document Doc is suitable" -} +dchrono t stop counter testreadstep smallview fit diff --git a/tests/bugs/moddata_2/bug276 b/tests/perf/moddata/bug276 old mode 100755 new mode 100644 similarity index 54% rename from tests/bugs/moddata_2/bug276 rename to tests/perf/moddata/bug276 index eda5f3a57d..93d7f2726f --- a/tests/bugs/moddata_2/bug276 +++ b/tests/perf/moddata/bug276 @@ -8,19 +8,11 @@ puts "" restore [locate_data_file OCC276.brep] result -dchrono h2 reset -dchrono h2 start +dchrono h2 restart checkshape result -dchrono h2 stop -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -if { [expr $z2 > 43] } { - puts "Elapsed time is more then 43 seconds - Faulty" -} else { - puts "Elapsed time is less then 43 seconds - OK" -} +dchrono h2 stop counter checkshape checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug36 b/tests/perf/moddata/bug36 old mode 100755 new mode 100644 similarity index 56% rename from tests/bugs/moddata_2/bug36 rename to tests/perf/moddata/bug36 index cad3453cf5..f9ac25989a --- a/tests/bugs/moddata_2/bug36 +++ b/tests/perf/moddata/bug36 @@ -11,18 +11,9 @@ if [catch { igesbrep $filepath a * } res] { puts "Reading OCC36 OK" tpcompound r - dchrono h2 reset - dchrono h2 start + dchrono h2 restart sewing result 1.e-7 r - dchrono h2 stop - set q2 [ dchrono h2 show ] - regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 - puts "$z2" - if { $z2 > 30 } { - puts "Elapsed time is more then 30 seconds - Faulty" - } else { - puts "Elapsed time is less then 30 seconds - OK" - } + dchrono h2 stop counter sewing checkmaxtol result -ref 0.96087447225733291 checknbshapes result -shell 13 diff --git a/tests/bugs/moddata_2/bug368 b/tests/perf/moddata/bug368 old mode 100755 new mode 100644 similarity index 65% rename from tests/bugs/moddata_2/bug368 rename to tests/perf/moddata/bug368 index 8952e87507..a05aed1d70 --- a/tests/bugs/moddata_2/bug368 +++ b/tests/perf/moddata/bug368 @@ -14,20 +14,9 @@ checkshape result tclean result isos result 0 vinit -dchrono h2 reset -dchrono h2 start +dchrono h2 restart vdisplay result vsetdispmode result 1 -dchrono h2 stop - -regexp {CPU user time: +([-0-9.+eE]+)} [dchrono h2 show] full z2 - -if { $z2 > 30 } { - puts "Error : Elapsed time is more then 30 seconds" -} - -checkview -display result -2d -path ${imagedir}/${test_image}.png - - - +dchrono h2 stop counter vdisplay +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/moddata_2/bug453_3 b/tests/perf/moddata/bug453_3 old mode 100755 new mode 100644 similarity index 73% rename from tests/bugs/moddata_2/bug453_3 rename to tests/perf/moddata/bug453_3 index b0b20a9b4c..bf2a2cecc2 --- a/tests/bugs/moddata_2/bug453_3 +++ b/tests/perf/moddata/bug453_3 @@ -9,8 +9,7 @@ puts "(case 3)" puts "========" puts "" -dchrono h2 reset -dchrono h2 start +dchrono h2 restart set make_print_out 0 @@ -26,17 +25,7 @@ blend result s 5.5*SCALE1 s_2 4*SCALE1 s_1 6*SCALE1 s_6 5*SCALE1 s_8 6*SCALE explode result So tcopy result_1 result -dchrono h2 stop - -# Check computation time -set q2 [ dchrono h2 show ] -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2 -puts "$z2" -if { $z2 > 85 } { - puts "Elapsed time is more then 85 seconds - Faulty" -} else { - puts "Elapsed time is less then 85 seconds - OK" -} +dchrono h2 stop counter blend # Note: The reference values of area and tolerance are wanted theoretical values # Properties check diff --git a/tests/bugs/moddata_3/bug623 b/tests/perf/moddata/bug623 similarity index 68% rename from tests/bugs/moddata_3/bug623 rename to tests/perf/moddata/bug623 index d3b6c851a8..9490ea2a20 100644 --- a/tests/bugs/moddata_3/bug623 +++ b/tests/perf/moddata/bug623 @@ -13,14 +13,9 @@ pload XDE stepread [locate_data_file OCC623.step] a * setflags a_1 locked -dchrono h reset -dchrono h start +dchrono h restart nurbsconvert result a_1 -dchrono h stop -set TimeList [dchrono h show] - -regexp {Elapsed time: +([-0-9.+eE]+)} $TimeList full ElapsedTime -puts "ElapsedTime = ${ElapsedTime}" +dchrono h stop counter nurbsconvert fsameparameter result checkshape result diff --git a/tests/perf/sewing/A1 b/tests/perf/sewing/A1 new file mode 100644 index 0000000000..f05d916b8c --- /dev/null +++ b/tests/perf/sewing/A1 @@ -0,0 +1,23 @@ +restore [locate_data_file 5000-12.brep] a + +dchrono ch restart +puts [fastsewing result -tol 2.0e-5 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 5556 + EDGE : 11118 + WIRE : 5552 + FACE : 5552 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 27780 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A2 b/tests/perf/sewing/A2 new file mode 100644 index 0000000000..aaf9f1c7a6 --- /dev/null +++ b/tests/perf/sewing/A2 @@ -0,0 +1,23 @@ +restore [locate_data_file 5000-16.brep] a + +dchrono ch restart +puts [fastsewing result -tol 2.0e-5 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 5527 + EDGE : 11056 + WIRE : 5520 + FACE : 5520 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 27625 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A3 b/tests/perf/sewing/A3 new file mode 100644 index 0000000000..882f0f5b2a --- /dev/null +++ b/tests/perf/sewing/A3 @@ -0,0 +1,23 @@ +restore [locate_data_file Cover_VXmodel.brep] a + +dchrono ch restart +puts [fastsewing result -tol 1.5e-4 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 844 + EDGE : 1592 + WIRE : 749 + FACE : 749 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 3936 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A4 b/tests/perf/sewing/A4 new file mode 100644 index 0000000000..c671e42c4f --- /dev/null +++ b/tests/perf/sewing/A4 @@ -0,0 +1,23 @@ +restore [locate_data_file Mustang_250.brep] a + +dchrono ch restart +puts [fastsewing result -tol 2.5e-4 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 250 + EDGE : 496 + WIRE : 248 + FACE : 248 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 1244 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A5 b/tests/perf/sewing/A5 new file mode 100644 index 0000000000..bd0373dd87 --- /dev/null +++ b/tests/perf/sewing/A5 @@ -0,0 +1,23 @@ +restore [locate_data_file Mustang_500.brep] a + +dchrono ch restart +puts [fastsewing result -tol 7.0e-5 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 514 + EDGE : 1024 + WIRE : 512 + FACE : 512 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 2564 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A6 b/tests/perf/sewing/A6 new file mode 100644 index 0000000000..a407e978fa --- /dev/null +++ b/tests/perf/sewing/A6 @@ -0,0 +1,23 @@ +restore [locate_data_file Pipe_Full.brep] a + +dchrono ch restart +puts [fastsewing result -tol 5.0e-4 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 5327 + EDGE : 10656 + WIRE : 5326 + FACE : 5326 + SHELL : 1 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 26637 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/A7 b/tests/perf/sewing/A7 new file mode 100644 index 0000000000..0f71f047b9 --- /dev/null +++ b/tests/perf/sewing/A7 @@ -0,0 +1,23 @@ +restore [locate_data_file Pipe_Partial.brep] a + +dchrono ch restart +puts [fastsewing result -tol 5.1e-4 a] +dchrono ch stop counter fastsewing + +donly result +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 5994 + EDGE : 11715 + WIRE : 5698 + FACE : 5698 + SHELL : 3 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 29109 +" + +checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/perf/sewing/begin b/tests/perf/sewing/begin new file mode 100644 index 0000000000..151b6dc036 --- /dev/null +++ b/tests/perf/sewing/begin @@ -0,0 +1,8 @@ +# To prevent loops limit to 5 minutes +cpulimit 300 + +if { [array get Draw_Groups "TOPOLOGY Feature commands"] == "" } { + pload XSDRAW +} + +set nbFreeEdges 0 diff --git a/tests/perf/sewing/end b/tests/perf/sewing/end new file mode 100644 index 0000000000..4713b108d4 --- /dev/null +++ b/tests/perf/sewing/end @@ -0,0 +1,5 @@ +if { [isdraw result] } { + checkview -display result -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error : The sewing cannot be built." +} \ No newline at end of file diff --git a/tests/bugs/vis/bug24623_1 b/tests/perf/vis/bug24623_1 similarity index 90% rename from tests/bugs/vis/bug24623_1 rename to tests/perf/vis/bug24623_1 index f83d251a06..37ee668f41 100644 --- a/tests/bugs/vis/bug24623_1 +++ b/tests/perf/vis/bug24623_1 @@ -48,11 +48,7 @@ vdisplay {*}$aNames vfit puts "Selection of spheres without BVH trees built:" -chrono aTimer reset -chrono aTimer start vmoveto 224 269 -chrono aTimer stop -chrono aTimer show puts "" puts "Applying the transformations..." @@ -61,11 +57,9 @@ vrotate 100 100 100 puts "" puts "Selection time with transformations applied without BVH built:" -chrono aTimer reset -chrono aTimer start +dchrono aTimer restart vmoveto 102 224 -chrono aTimer stop -chrono aTimer show +dchrono aTimer stop counter vmoveto # puts "" # puts "Start building all trees..." @@ -83,11 +77,10 @@ chrono aTimer show # puts "" # puts "Selection time with all BVHs built:" -# chrono aTimer reset -# chrono aTimer start +# dchrono aTimer reset +# dchrono aTimer start # vmoveto 200 200 -# chrono aTimer stop -# chrono aTimer show +# dchrono aTimer stop set aMemSel [meminfo h] puts "Selection mem: [expr $aMemSel / (1024 * 1024)] MiB ([expr $aMemSel])" diff --git a/tests/bugs/vis/bug24623_2 b/tests/perf/vis/bug24623_2 similarity index 79% rename from tests/bugs/vis/bug24623_2 rename to tests/perf/vis/bug24623_2 index 784cb7fee0..edaf558dfb 100644 --- a/tests/bugs/vis/bug24623_2 +++ b/tests/perf/vis/bug24623_2 @@ -36,18 +36,9 @@ vdisplay p vfit -puts "Selection time before the transformations:" -chrono aTimer reset -chrono aTimer start vmoveto 223 236 -chrono aTimer stop -chrono aTimer show vmoveto 0 0 -chrono aTimer reset -chrono aTimer start vmoveto 223 236 -chrono aTimer stop -chrono aTimer show puts "" puts "Applying transformations..." @@ -56,17 +47,13 @@ vrotate 100 100 100 puts "" puts "Selection time after the transformations:" -chrono aTimer reset -chrono aTimer start +dchrono aTimer restart vmoveto 115 160 -chrono aTimer stop -chrono aTimer show +dchrono aTimer stop counter vmoveto_1 vmoveto 0 0 -chrono aTimer reset -chrono aTimer start +dchrono aTimer restart vmoveto 115 160 -chrono aTimer stop -chrono aTimer show +dchrono aTimer stop counter vmoveto_2 set aMemSel [meminfo h] puts "Selection mem: [expr $aMemSel / (1024 * 1024)] MiB ([expr $aMemSel])" diff --git a/tests/sewing/fast/A1 b/tests/sewing/fast/A1 deleted file mode 100644 index cc0fbf6aa7..0000000000 --- a/tests/sewing/fast/A1 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file 5000-12.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 2.0e-5 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 5556 - EDGE : 11118 - WIRE : 5552 - FACE : 5552 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 27780 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A2 b/tests/sewing/fast/A2 deleted file mode 100644 index 9fbef2abf7..0000000000 --- a/tests/sewing/fast/A2 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file 5000-16.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 2.0e-5 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 5527 - EDGE : 11056 - WIRE : 5520 - FACE : 5520 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 27625 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A3 b/tests/sewing/fast/A3 deleted file mode 100644 index 21e26ab458..0000000000 --- a/tests/sewing/fast/A3 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file Cover_VXmodel.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 1.5e-4 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 844 - EDGE : 1592 - WIRE : 749 - FACE : 749 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 3936 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A4 b/tests/sewing/fast/A4 deleted file mode 100644 index e85a31e8e6..0000000000 --- a/tests/sewing/fast/A4 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file Mustang_250.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 2.5e-4 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 250 - EDGE : 496 - WIRE : 248 - FACE : 248 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 1244 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A5 b/tests/sewing/fast/A5 deleted file mode 100644 index 629ff635c0..0000000000 --- a/tests/sewing/fast/A5 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file Mustang_500.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 7.0e-5 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 514 - EDGE : 1024 - WIRE : 512 - FACE : 512 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 2564 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A6 b/tests/sewing/fast/A6 deleted file mode 100644 index 9de064b496..0000000000 --- a/tests/sewing/fast/A6 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file Pipe_Full.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 5.0e-4 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 5327 - EDGE : 10656 - WIRE : 5326 - FACE : 5326 - SHELL : 1 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 26637 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/fast/A7 b/tests/sewing/fast/A7 deleted file mode 100644 index 7ee885eaad..0000000000 --- a/tests/sewing/fast/A7 +++ /dev/null @@ -1,49 +0,0 @@ -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 9 - } else { - set max_time 9 - } -} else { - if { [regexp {Windows} [dversion]] } { - set max_time 3 - } else { - set max_time 3 - } -} - -restore [locate_data_file Pipe_Partial.brep] a - -dchrono ch reset -dchrono ch start -puts [fastsewing result -tol 5.1e-4 a] -dchrono ch stop - -set q [dchrono ch show] - -regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z -puts "$z" - -if { $z > ${max_time} } { - puts "Elapsed time is more than ${max_time} seconds - Error" -} else { - puts "Elapsed time is less than ${max_time} seconds - OK" -} - -donly result -checkshape result - -set nbshapes_expected " -Number of shapes in shape - VERTEX : 5994 - EDGE : 11715 - WIRE : 5698 - FACE : 5698 - SHELL : 3 - SOLID : 0 - COMPSOLID : 0 - COMPOUND : 1 - SHAPE : 29109 -" - -checknbshapes result -ref "${nbshapes_expected}" -t -m "Partition of 2 shapes" diff --git a/tests/sewing/grids.list b/tests/sewing/grids.list index 5df61fab64..ed36e9594b 100755 --- a/tests/sewing/grids.list +++ b/tests/sewing/grids.list @@ -1,4 +1,3 @@ 001 tol_0_01 002 tol_1 003 tol_100 -004 fast