X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fsorter%2Fsort-test.c;h=3990254d27bab7f699976fd623c13a7461bfc25e;hb=b340e1fbbfa9fcfc4c3f9ef41c84f2e86c523bdc;hp=5464f744fd1eb226d2af7df4a82d8b43805021fb;hpb=e65a1a48088af1a5731f64b50ba933f4c29d5040;p=libucw.git diff --git a/lib/sorter/sort-test.c b/lib/sorter/sort-test.c index 5464f744..3990254d 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" @@ -22,18 +23,20 @@ /*** Time measurement ***/ +static timestamp_t timer; + static void start(void) { sync(); - init_timer(); + init_timer(&timer); } static void stop(void) { sync(); - log(L_INFO, "Test took %.3fs", get_timer() / 1000.); + log(L_INFO, "Test took %.3fs", get_timer(&timer) / 1000.); } /*** Simple 4-byte integer keys ***/ @@ -48,6 +51,7 @@ struct key1 { #define SORT_OUTPUT_FB #define SORT_UNIQUE #define SORT_INT(k) (k).x +#define SORT_DELETE_INPUT 0 #include "lib/sorter/sorter.h" @@ -410,7 +414,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