Benchmark: use return values of test runner.
This commit is contained in:
parent
291089dec7
commit
3929d9298d
11 changed files with 52 additions and 40 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@
|
|||
*.a
|
||||
*.swp
|
||||
*.dylib
|
||||
mapnik-gyp
|
||||
plugins/input/*.input
|
||||
plugins/input/templates/*.input
|
||||
demo/c++/rundemo
|
||||
|
|
|
@ -386,61 +386,62 @@ public:
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int retVal = 0;
|
||||
mapnik::parameters params;
|
||||
benchmark::handle_args(argc,argv,params);
|
||||
{
|
||||
test4 test_runner4(params);
|
||||
run(test_runner4,"calloc");
|
||||
retVal = retVal | run(test_runner4,"calloc");
|
||||
}
|
||||
{
|
||||
test1 test_runner(params);
|
||||
run(test_runner,"malloc/memcpy");
|
||||
retVal = retVal | run(test_runner,"malloc/memcpy");
|
||||
}
|
||||
{
|
||||
test1b test_runner(params);
|
||||
run(test_runner,"malloc/memset");
|
||||
retVal = retVal | run(test_runner,"malloc/memset");
|
||||
}
|
||||
{
|
||||
test1c test_runner(params);
|
||||
run(test_runner,"operator new/std::fill");
|
||||
retVal = retVal | run(test_runner,"operator new/std::fill");
|
||||
}
|
||||
{
|
||||
test2 test_runner(params);
|
||||
run(test_runner,"operator new/memcpy");
|
||||
retVal = retVal | run(test_runner,"operator new/memcpy");
|
||||
}
|
||||
{
|
||||
test3 test_runner(params);
|
||||
run(test_runner,"vector(N)");
|
||||
retVal = retVal | run(test_runner,"vector(N)");
|
||||
}
|
||||
{
|
||||
test3b test_runner(params);
|
||||
run(test_runner,"vector/resize");
|
||||
retVal = retVal | run(test_runner,"vector/resize");
|
||||
}
|
||||
{
|
||||
test3c test_runner(params);
|
||||
run(test_runner,"vector/assign");
|
||||
retVal = retVal | run(test_runner,"vector/assign");
|
||||
}
|
||||
{
|
||||
test3d test_runner(params);
|
||||
run(test_runner,"deque(N)");
|
||||
retVal = retVal | run(test_runner,"deque(N)");
|
||||
}
|
||||
{
|
||||
test5 test_runner(params);
|
||||
run(test_runner,"std::string range");
|
||||
retVal = retVal | run(test_runner,"std::string range");
|
||||
}
|
||||
{
|
||||
test5b test_runner(params);
|
||||
run(test_runner,"std::string &[0]");
|
||||
retVal = retVal | run(test_runner,"std::string &[0]");
|
||||
}
|
||||
{
|
||||
test6 test_runner(params);
|
||||
run(test_runner,"valarray");
|
||||
retVal = retVal | run(test_runner,"valarray");
|
||||
}
|
||||
#if BOOST_VERSION >= 105400
|
||||
{
|
||||
test7 test_runner(params);
|
||||
run(test_runner,"static_vector");
|
||||
retVal = retVal | run(test_runner,"static_vector");
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -37,5 +37,5 @@ int main(int argc, char** argv)
|
|||
mapnik::parameters params;
|
||||
benchmark::handle_args(argc,argv,params);
|
||||
test test_runner(params);
|
||||
run(test_runner,"expr parsing");
|
||||
return run(test_runner,"expr parsing");
|
||||
}
|
||||
|
|
|
@ -75,13 +75,14 @@ int main(int argc, char** argv)
|
|||
{
|
||||
mapnik::parameters params;
|
||||
benchmark::handle_args(argc,argv,params);
|
||||
int retVal = 0;
|
||||
{
|
||||
test_static test_runner(params);
|
||||
run(test_runner,"static_cast");
|
||||
retVal = retVal | run(test_runner,"static_cast");
|
||||
}
|
||||
{
|
||||
test_numeric test_runner(params);
|
||||
run(test_runner,"numeric_cast");
|
||||
retVal = retVal | run(test_runner,"numeric_cast");
|
||||
}
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -93,9 +93,10 @@ int main(int argc, char** argv)
|
|||
{
|
||||
mapnik::parameters params;
|
||||
benchmark::handle_args(argc,argv,params);
|
||||
int retVal = 0;
|
||||
{
|
||||
test_offset test_runner(params);
|
||||
run(test_runner,"offset_test");
|
||||
retVal = run(test_runner,"offset_test");
|
||||
}
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -528,19 +528,20 @@ int main(int argc, char** argv)
|
|||
throw std::runtime_error("could not open: '" + filename_ + "'");
|
||||
std::string wkt_in( (std::istreambuf_iterator<char>(in) ),
|
||||
(std::istreambuf_iterator<char>()) );
|
||||
int retVal = 0;
|
||||
{
|
||||
test1 test_runner(params,wkt_in,clipping_box);
|
||||
run(test_runner,"clipping polygon with agg");
|
||||
retVal = retVal | run(test_runner,"clipping polygon with agg");
|
||||
}
|
||||
{
|
||||
test3 test_runner(params,wkt_in,clipping_box);
|
||||
run(test_runner,"clipping polygon with boost");
|
||||
retVal = retVal | run(test_runner,"clipping polygon with boost");
|
||||
}
|
||||
/*
|
||||
{
|
||||
test4 test_runner(params,wkt_in,clipping_box);
|
||||
run(test_runner,"clipping polygon with clipper_tree");
|
||||
retVal = retVal | run(test_runner,"clipping polygon with clipper_tree");
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -51,29 +51,30 @@ int main(int argc, char** argv)
|
|||
mapnik::box2d<double> z1(-20037508.3428,-8317435.0606,20037508.3428,18399242.7298);
|
||||
// bbox for 16/10491/22911.png
|
||||
mapnik::box2d<double> z16(-13622912.929097254,6026906.8062295765,-13621689.93664469,6028129.79868214);
|
||||
int retVal = 0;
|
||||
{
|
||||
test test_runner(params,
|
||||
"benchmark/data/polygon_rendering_clip.xml",
|
||||
z1);
|
||||
run(test_runner,"polygon clip render z1");
|
||||
retVal = retVal | run(test_runner,"polygon clip render z1");
|
||||
}
|
||||
{
|
||||
test test_runner(params,
|
||||
"benchmark/data/polygon_rendering_no_clip.xml",
|
||||
z1);
|
||||
run(test_runner,"polygon noclip render z1");
|
||||
retVal = retVal | run(test_runner,"polygon noclip render z1");
|
||||
}
|
||||
{
|
||||
test test_runner(params,
|
||||
"benchmark/data/polygon_rendering_clip.xml",
|
||||
z16);
|
||||
run(test_runner,"polygon clip render z16");
|
||||
retVal = retVal | run(test_runner,"polygon clip render z16");
|
||||
}
|
||||
{
|
||||
test test_runner(params,
|
||||
"benchmark/data/polygon_rendering_no_clip.xml",
|
||||
z16);
|
||||
run(test_runner,"polygon noclip render z16");
|
||||
retVal = retVal | run(test_runner,"polygon noclip render z16");
|
||||
}
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -67,32 +67,34 @@ int main(int argc, char** argv)
|
|||
std::string to_str("+init=epsg:3857");
|
||||
std::string from_str2("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
|
||||
std::string to_str2("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over");
|
||||
int retVal = 0;
|
||||
test test_runner(params,
|
||||
from_str,
|
||||
to_str,
|
||||
from,
|
||||
to,
|
||||
true);
|
||||
run(test_runner,"lonlat->merc epsg");
|
||||
retVal = retVal | run(test_runner,"lonlat->merc epsg");
|
||||
test test_runner2(params,
|
||||
from_str2,
|
||||
to_str2,
|
||||
from,
|
||||
to,
|
||||
true);
|
||||
run(test_runner2,"lonlat->merc literal");
|
||||
retVal = retVal | run(test_runner2,"lonlat->merc literal");
|
||||
test test_runner3(params,
|
||||
to_str,
|
||||
from_str,
|
||||
to,
|
||||
from,
|
||||
true);
|
||||
run(test_runner3,"merc->lonlat epsg");
|
||||
retVal = retVal | run(test_runner3,"merc->lonlat epsg");
|
||||
test test_runner4(params,
|
||||
to_str2,
|
||||
from_str2,
|
||||
to,
|
||||
from,
|
||||
true);
|
||||
return run(test_runner4,"merc->lonlat literal");
|
||||
retVal = retVal | run(test_runner4,"merc->lonlat literal");
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,7 @@ public:
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int retVal = 0;
|
||||
try
|
||||
{
|
||||
mapnik::parameters params;
|
||||
|
@ -102,7 +103,7 @@ int main(int argc, char** argv)
|
|||
mapnik::datasource_cache::instance().register_datasources("./plugins/input/");
|
||||
{
|
||||
test test_runner(params);
|
||||
run(test_runner,*name);
|
||||
retVal = run(test_runner,*name);
|
||||
}
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
|
@ -110,5 +111,5 @@ int main(int argc, char** argv)
|
|||
std::clog << ex.what() << "\n";
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ public:
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int retVal = 0;
|
||||
try
|
||||
{
|
||||
mapnik::parameters params;
|
||||
|
@ -159,7 +160,7 @@ int main(int argc, char** argv)
|
|||
mapnik::datasource_cache::instance().register_datasources("./plugins/input/");
|
||||
{
|
||||
test test_runner(params);
|
||||
run(test_runner,*name);
|
||||
retVal = run(test_runner,*name);
|
||||
}
|
||||
}
|
||||
catch (std::exception const& ex)
|
||||
|
@ -167,5 +168,5 @@ int main(int argc, char** argv)
|
|||
std::clog << ex.what() << "\n";
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -97,14 +97,16 @@ int main(int argc, char** argv)
|
|||
{
|
||||
mapnik::parameters params;
|
||||
benchmark::handle_args(argc,argv,params);
|
||||
int retVal = 0;
|
||||
#ifndef __linux__
|
||||
test test_runner(params);
|
||||
run(test_runner,"utf encode std::codecvt");
|
||||
retVal = retVal | run(test_runner,"utf encode std::codecvt");
|
||||
#else
|
||||
std::clog << "skipping 'utf encode std::codecvt' test since <codecvt> is not supported on __linux__\n";
|
||||
#endif
|
||||
test2 test_runner2(params);
|
||||
run(test_runner2,"utf encode boost::locale");
|
||||
retVal = retVal | run(test_runner2,"utf encode boost::locale");
|
||||
test3 test_runner3(params);
|
||||
return run(test_runner3,"utf encode ICU");
|
||||
retVal = retVal | run(test_runner3,"utf encode ICU");
|
||||
return retVal;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue