#include "fio_version.h"
-#if FIO_PATCH > 0
-const char fio_version_string[] = __fio_stringify(FIO_MAJOR) "." \
- __fio_stringify(FIO_MINOR) "." \
- __fio_stringify(FIO_PATCH);
-#else
-const char fio_version_string[] = __fio_stringify(FIO_MAJOR) "." \
- __fio_stringify(FIO_MINOR);
-#endif
+const char fio_version_string[] = FIO_VERSION;
#define FIO_RANDSEED (0xb1899bedUL)
static int did_arg;
const fio_fp64_t def_percentile_list[FIO_IO_U_LIST_MAX_LEN] = {
- { .u.f = 1.0 },
- { .u.f = 5.0 },
- { .u.f = 10.0 },
- { .u.f = 20.0 },
- { .u.f = 30.0 },
- { .u.f = 40.0 },
- { .u.f = 50.0 },
- { .u.f = 60.0 },
- { .u.f = 70.0 },
- { .u.f = 80.0 },
- { .u.f = 90.0 },
- { .u.f = 95.0 },
- { .u.f = 99.0 },
- { .u.f = 99.5 },
- { .u.f = 99.9 },
+ { .u.f = 1.00 },
+ { .u.f = 5.00 },
+ { .u.f = 10.00 },
+ { .u.f = 20.00 },
+ { .u.f = 30.00 },
+ { .u.f = 40.00 },
+ { .u.f = 50.00 },
+ { .u.f = 60.00 },
+ { .u.f = 70.00 },
+ { .u.f = 80.00 },
+ { .u.f = 90.00 },
+ { .u.f = 95.00 },
+ { .u.f = 99.00 },
+ { .u.f = 99.50 },
+ { .u.f = 99.90 },
+ { .u.f = 99.95 },
+ { .u.f = 99.99 },
};
#define FIO_CLIENT_FLAG (1 << 16)
/*
* This function leaks the buffer
*/
-static char *to_kmg(unsigned int val)
+char *fio_uint_to_kmg(unsigned int val)
{
char *buf = malloc(32);
char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 };
if (ioengine_load(td))
goto err;
- if (td->o.use_thread)
- nr_thread++;
- else
- nr_process++;
-
if (td->o.odirect)
td->io_ops->flags |= FIO_RAWIO;
if (!terse_output) {
if (!job_add_num) {
if (is_backend && !recursed)
- fio_server_send_add_job(&td->o, td->io_ops->name);
+ fio_server_send_add_job(td);
- if (!strcmp(td->io_ops->name, "cpuio")) {
- log_info("%s: ioengine=cpu, cpuload=%u,"
- " cpucycle=%u\n", td->o.name,
- td->o.cpuload,
- td->o.cpucycle);
- } else {
+ if (!(td->io_ops->flags & FIO_NOIO)) {
char *c1, *c2, *c3, *c4;
- c1 = to_kmg(td->o.min_bs[DDIR_READ]);
- c2 = to_kmg(td->o.max_bs[DDIR_READ]);
- c3 = to_kmg(td->o.min_bs[DDIR_WRITE]);
- c4 = to_kmg(td->o.max_bs[DDIR_WRITE]);
+ c1 = fio_uint_to_kmg(td->o.min_bs[DDIR_READ]);
+ c2 = fio_uint_to_kmg(td->o.max_bs[DDIR_READ]);
+ c3 = fio_uint_to_kmg(td->o.min_bs[DDIR_WRITE]);
+ c4 = fio_uint_to_kmg(td->o.max_bs[DDIR_WRITE]);
log_info("%s: (g=%d): rw=%s, bs=%s-%s/%s-%s,"
" ioengine=%s, iodepth=%u\n",
static void usage(const char *name)
{
- printf("fio %s\n", fio_version_string);
+ printf("%s\n", fio_version_string);
printf("%s [options] [job options] <job file(s)>\n", name);
printf(" --debug=options\tEnable debug logging. May be one/more of:\n"
"\t\t\tprocess,file,io,mem,blktrace,verify,random,parse,\n"
break;
case 'v':
if (!cur_client) {
- log_info("fio %s\n", fio_version_string);
+ log_info("%s\n", fio_version_string);
do_exit++;
}
break;
}
if (!terse_output)
- log_info("fio %s\n", fio_version_string);
+ log_info("%s\n", fio_version_string);
return 0;
}
+
+void options_default_fill(struct thread_options *o)
+{
+ memcpy(o, &def_thread.o, sizeof(*o));
+}