font registration test
This commit is contained in:
parent
8c3683f41f
commit
6ce0828a6f
1 changed files with 26 additions and 0 deletions
26
benchmark/test_font_registration.cpp
Normal file
26
benchmark/test_font_registration.cpp
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#include "bench_framework.hpp"
|
||||||
|
#include <mapnik/font_engine_freetype.hpp>
|
||||||
|
#include <boost/format.hpp>
|
||||||
|
#include <boost/foreach.hpp>
|
||||||
|
|
||||||
|
class test : public benchmark::test_case
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
test(mapnik::parameters const& params)
|
||||||
|
: test_case(params) {}
|
||||||
|
bool validate() const
|
||||||
|
{
|
||||||
|
return mapnik::freetype_engine::register_fonts("./fonts", true);
|
||||||
|
}
|
||||||
|
void operator()() const
|
||||||
|
{
|
||||||
|
unsigned long count = 0;
|
||||||
|
for (unsigned i=0;i<iterations_;++i)
|
||||||
|
{
|
||||||
|
mapnik::freetype_engine::register_fonts("./fonts", true);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
BENCHMARK(test,"font registration")
|
Loading…
Reference in a new issue