#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"
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
+#include <unistd.h>
/*** 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 ***/
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<n; i++)