#include "verify.h"
#include "profile.h"
#include "server.h"
+#include "idletime.h"
#include "lib/getopt.h"
static char cmd_optstr[256];
static int did_arg;
-const fio_fp64_t def_percentile_list[FIO_IO_U_LIST_MAX_LEN] = {
- { .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)
/*
.has_arg = no_argument,
.val = 'T',
},
+ {
+ .name = (char *) "idle-prof",
+ .has_arg = required_argument,
+ .val = 'I',
+ },
{
.name = NULL,
},
p++;
} while (*p);
- snprintf(buf, 31, "%u%c", val, *p);
+ snprintf(buf, 32, "%u%c", val, *p);
return buf;
}
td->mutex = fio_mutex_init(FIO_MUTEX_LOCKED);
td->ts.clat_percentiles = td->o.clat_percentiles;
- if (td->o.overwrite_plist)
- memcpy(td->ts.percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list));
- else
- memcpy(td->ts.percentile_list, def_percentile_list, sizeof(def_percentile_list));
+ td->ts.percentile_precision = td->o.percentile_precision;
+ memcpy(td->ts.percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list));
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
td->ts.clat_stat[i].min_val = ULONG_MAX;
printf(" --server=args\t\tStart a backend fio server\n");
printf(" --daemonize=pidfile\tBackground fio server, write pid to file\n");
printf(" --client=hostname\tTalk to remote backend fio server at hostname\n");
+ printf(" --idle-prof=option\tReport cpu idleness on a system or percpu basis\n"
+ "\t\t\t(option=system,percpu) or run unit work\n"
+ "\t\t\tcalibration only (option=calibrate)\n");
printf("\nFio was written by Jens Axboe <jens.axboe@oracle.com>");
printf("\n Jens Axboe <jaxboe@fusionio.com>\n");
}
case 'D':
pid_file = strdup(optarg);
break;
+ case 'I':
+ if ((ret = fio_idle_prof_parse_opt(optarg))) {
+ /* exit on error and calibration only */
+ do_exit++;
+ if (ret == -1)
+ exit_val = 1;
+ }
+ break;
case 'C':
if (is_backend) {
log_err("fio: can't be both client and server\n");
do_exit++;
exit_val = fio_monotonic_clocktest();
break;
+ case '?':
+ log_err("%s: unrecognized option '%s'\n", argv[0],
+ argv[optind - 1]);
default:
do_exit++;
exit_val = 1;