make the default value of numeric parameter 0, not 1, to make testing for it more natural; also allow passing string parameter to the benchmarks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -48,7 +48,11 @@ const wxString& GetTestAsciiString()
|
||||
static wxString testString;
|
||||
if ( testString.empty() )
|
||||
{
|
||||
for ( long n = 0; n < Bench::GetNumericParameter(); n++ )
|
||||
long num = Bench::GetNumericParameter();
|
||||
if ( !num )
|
||||
num = 1;
|
||||
|
||||
for ( long n = 0; n < num; n++ )
|
||||
testString += wxString::FromAscii(asciistr);
|
||||
}
|
||||
|
||||
@@ -318,7 +322,11 @@ BENCHMARK_FUNC(ParseHTML)
|
||||
|
||||
// this is going to make for some invalid HTML, of course, but it
|
||||
// doesn't really matter
|
||||
for ( long n = 0; n < Bench::GetNumericParameter(); n++ )
|
||||
long num = Bench::GetNumericParameter();
|
||||
if ( !num )
|
||||
num = 1;
|
||||
|
||||
for ( long n = 0; n < num; n++ )
|
||||
html += html1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user