17 #ifndef VCSN_MISC_GLOBAL_BENCHER_HH
18 # define VCSN_MISC_GLOBAL_BENCHER_HH
24 # ifdef GLOBAL_BENCHER
26 # include <cbs/bench/bench.hh>
27 # include <cbs/bench/bench_internals.hh>
30 # include <vaucanson/misc/bencher.hh>
32 # include "bencher.hh"
35 # define BENCHER_DO(Iterations) \
36 for (unsigned i_ = 1; i_ <= (Iterations); \
37 ++i_, GLOBAL_BENCHER.push(bench::current_timer()), bench::restart())
39 # define BENCHER_PRINT(Stream) \
40 Stream << GLOBAL_BENCHER << std::endl
42 # define BENCHER_PLOT(Stream) \
43 GLOBAL_BENCHER.plot (Stream)
45 # define BENCHER_SAVE_PLOT(Filename) \
47 std::ofstream o (Filename, \
48 std::ofstream::out | std::ofstream::trunc); \
55 # define BENCHER_DO(Iterations) ((void) 0)
56 # define BENCHER_PRINT(Stream) ((void) 0)
57 # define BENCHER_PLOT(Stream) ((void) 0)
58 # define BENCHER_SAVE_PLOT(Filename) ((void) 0)
63 #endif // ! VCSN_MISC_GLOBAL_BENCHER_HH