X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fsorter%2Fsort-test.c;h=524a4cdc763da9d2608cf497436b626af19699d5;hb=8c8736b23823acce9df684b85c6320cc36e43f76;hp=2909599f838d64e245c4126283e7aba70a7331c9;hpb=1abbc2deb8deef4d440f36e32d031b6803224dcd;p=libucw.git diff --git a/lib/sorter/sort-test.c b/lib/sorter/sort-test.c index 2909599f..524a4cdc 100644 --- a/lib/sorter/sort-test.c +++ b/lib/sorter/sort-test.c @@ -11,6 +11,7 @@ #include "lib/getopt.h" #include "lib/conf.h" #include "lib/fastbuf.h" +#include "lib/ff-binary.h" #include "lib/hashfunc.h" #include "lib/md5.h" @@ -18,19 +19,24 @@ #include #include #include +#include /*** Time measurement ***/ +static timestamp_t timer; + static void start(void) { - init_timer(); + sync(); + init_timer(&timer); } static void stop(void) { - log(L_INFO, "Test took %.3fs", get_timer() / 1000.); + sync(); + log(L_INFO, "Test took %.3fs", get_timer(&timer) / 1000.); } /*** Simple 4-byte integer keys ***/ @@ -407,7 +413,6 @@ static int s5_gen(struct s5_pair *p) static void s5_write_merged(struct fastbuf *f, struct key5 **keys, void **data, uns n, void *buf) { - /* FIXME: Allow mode where this function is not defined? */ u32 *a = buf; uns m = 0; for (uns i=0; i