limit benchmarks

This commit is contained in:
Dane Springmeyer 2014-08-13 17:21:22 -07:00
parent 5b52fa94b1
commit b415549823
3 changed files with 30 additions and 10 deletions

View file

@ -22,7 +22,26 @@ if env['PLATFORM'] == 'Darwin':
test_env_local = test_env.Clone()
for cpp_test in glob.glob('*cpp'):
#benchmarks = glob.glob('test*cpp')
benchmarks = [
#"test_array_allocation.cpp",
#"test_png_encoding1.cpp",
#"test_png_encoding2.cpp",
#"test_to_string1.cpp",
#"test_to_string2.cpp",
#"test_to_bool.cpp",
#"test_to_double.cpp",
#"test_to_int.cpp",
#"test_utf_encoding.cpp"
#"test_polygon_clipping.cpp",
#"test_polygon_clipping_rendering.cpp",
"test_proj_transform1.cpp",
"test_expression_parse.cpp",
"test_face_ptr_creation.cpp",
"test_font_registration.cpp",
"test_rendering.cpp",
]
for cpp_test in benchmarks:
test_program = test_env_local.Program('out/'+cpp_test.replace('.cpp',''), source=[cpp_test])
if 'install' in COMMAND_LINE_TARGETS:
env.Alias('install',test_program)

View file

@ -10,16 +10,17 @@ function run {
${BASE}/$1 --threads $2 --iterations $(expr $3 / $2);
}
run test_array_allocation 20 100000
run test_png_encoding1 10 1000
run test_png_encoding2 10 50
run test_to_string1 10 100000
run test_to_string2 10 100000
#run test_array_allocation 20 100000
#run test_png_encoding1 10 1000
#run test_png_encoding2 10 50
#run test_to_string1 10 100000
#run test_to_string2 10 100000
#run test_polygon_clipping 10 1000
#run test_polygon_clipping_rendering 10 100
run test_proj_transform1 10 100
run test_expression_parse 10 10000
run test_face_ptr_creation 10 10000
run test_polygon_clipping 10 1000
run test_polygon_clipping_rendering 10 100
run test_font_registration 10 1000
./benchmark/out/test_rendering \
--name "text rendering" \

View file

@ -39,9 +39,9 @@ public:
void operator()() const
{
for (std::size_t i=0;i<iterations_;++i) {
for (int i=-180;i<180;++i)
for (int i=-180;i<180;i=i+5)
{
for (int j=-85;j<85;++j)
for (int j=-85;j<85;j=j+5)
{
mapnik::projection src(src_,defer_proj4_init_);
mapnik::projection dest(dest_,defer_proj4_init_);