mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0029942: Porting to Debian80-64 : Regressions in Modeling Algorithms after integration fix for 29807
Correction in the test case perf/modalg/bug27021.
This commit is contained in:
parent
39ab2e0c4d
commit
c520fb2aa2
@ -1431,20 +1431,20 @@ static Standard_Integer OCC27021(Draw_Interpretor& theDI,
|
|||||||
std::pair<gp_Pnt, gp_Pnt> vertices;
|
std::pair<gp_Pnt, gp_Pnt> vertices;
|
||||||
clock_t t = clock();
|
clock_t t = clock();
|
||||||
|
|
||||||
theDI << "\nRetrieving " << iterations << " vertices using approach A)...";
|
theDI << "\nRetrieving " << iterations << " vertices using approach A)...\n";
|
||||||
for (int i = 0; i < iterations; ++i)
|
for (int i = 0; i < iterations; ++i)
|
||||||
{
|
{
|
||||||
vertices = getVerticesA(edge);
|
vertices = getVerticesA(edge);
|
||||||
}
|
}
|
||||||
theDI << "done in " << (clock() - t) / (double)CLOCKS_PER_SEC << " seconds\n";
|
theDI << "COUNTER RetrievingVertA" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
|
||||||
t = clock();
|
t = clock();
|
||||||
|
|
||||||
theDI << "\nRetrieving " << iterations << " vertices using approach B)...";
|
theDI << "\nRetrieving " << iterations << " vertices using approach B)...\n";
|
||||||
for (int i = 0; i < iterations; ++i)
|
for (int i = 0; i < iterations; ++i)
|
||||||
{
|
{
|
||||||
vertices = getVerticesB(edge);
|
vertices = getVerticesB(edge);
|
||||||
}
|
}
|
||||||
theDI << "done in " << (clock() - t) / (double)CLOCKS_PER_SEC << " seconds\n";
|
theDI << "COUNTER RetrievingVertB" << ": " << (clock() - t) / (double)CLOCKS_PER_SEC << "\n";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
puts "========"
|
|
||||||
puts "OCC27021"
|
|
||||||
puts "========"
|
|
||||||
puts ""
|
|
||||||
###########################################################
|
|
||||||
# TopExp::Vertices performance optimization
|
|
||||||
###########################################################
|
|
||||||
|
|
||||||
pload QAcommands
|
|
||||||
|
|
||||||
if { [regexp {Debug mode} [dversion]] } {
|
|
||||||
if { [regexp {Windows} [dversion]] } {
|
|
||||||
set max_time 8.
|
|
||||||
set max_time2 5.
|
|
||||||
} else {
|
|
||||||
set max_time 8.
|
|
||||||
set max_time2 5.
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if { [regexp {Windows} [dversion]] } {
|
|
||||||
set max_time 8.
|
|
||||||
set max_time2 5.
|
|
||||||
} else {
|
|
||||||
set max_time 8.
|
|
||||||
set max_time2 5.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
restore [locate_data_file bug27021_shape.brep] f
|
|
||||||
|
|
||||||
set log [OCC27021 f]
|
|
||||||
|
|
||||||
regexp {Retrieving 100000000 vertices using approach A\)\.\.\.done in ([-0-9.+eE]+) seconds} ${log} full A_sec
|
|
||||||
regexp {Retrieving 100000000 vertices using approach B\)\.\.\.done in ([-0-9.+eE]+) seconds} ${log} full B_sec
|
|
||||||
|
|
||||||
|
|
||||||
if { ${A_sec} > ${max_time} } {
|
|
||||||
puts "Retrieving 100000000 vertices using approach A) is more than ${max_time} seconds - Faulty"
|
|
||||||
} else {
|
|
||||||
puts "Retrieving 100000000 vertices using approach A) is less than ${max_time} seconds - OK"
|
|
||||||
}
|
|
||||||
|
|
||||||
if { ${B_sec} > ${max_time2} } {
|
|
||||||
puts "Retrieving 100000000 vertices using approach A) is more than ${max_time2} seconds - Faulty"
|
|
||||||
} else {
|
|
||||||
puts "Retrieving 100000000 vertices using approach A) is less than ${max_time2} seconds - OK"
|
|
||||||
}
|
|
10
tests/perf/modalg/bug27021
Normal file
10
tests/perf/modalg/bug27021
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC27021: TopExp::Vertices performance optimization"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload QAcommands
|
||||||
|
|
||||||
|
restore [locate_data_file bug27021_shape.brep] f
|
||||||
|
|
||||||
|
OCC27021 f
|
Loading…
x
Reference in New Issue
Block a user