static unsigned int rt_threshold = 1000000;
static unsigned int ios_threshold = 10;
static int output_ascii = 1;
+static char *filename;
struct bs {
unsigned int bs;
unsigned int i;
char dev[256];
+ if (filename)
+ return;
if (o->last_major == maj && o->last_minor == min)
return;
printf("rwmixread=%u\n", (int) (perc + 0.99));
}
- printf("percentage_sequential=");
+ printf("percentage_random=");
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
if (o->seq[i] && o->ios[i]) {
perc = ((float) o->seq[i] * 100.0) / (float) o->ios[i];
if (i)
printf(",");
+ perc = 100.0 - perc;
printf("%u", (int) perc);
}
printf("\n");
qsort(o->bs[i], o->nr_bs[i], sizeof(struct bs), bs_cmp);
}
+ if (filename) {
+ o->files = malloc(sizeof(struct trace_file));
+ o->nr_files++;
+ o->files[0].name = filename;
+ }
+
if (output_ascii)
__output_p_ascii(p, ios);
else
fprintf(stderr, "\t-t\tUsec threshold to ignore task\n");
fprintf(stderr, "\t-n\tNumber IOS threshold to ignore task\n");
fprintf(stderr, "\t-f\tFio job file output\n");
+ fprintf(stderr, "\t-d\tUse this file/device for replay\n");
return 1;
}
if (argc < 2)
return usage(argv);
- while ((c = getopt(argc, argv, "t:n:f")) != -1) {
+ while ((c = getopt(argc, argv, "t:n:fd:")) != -1) {
switch (c) {
case 't':
rt_threshold = atoi(optarg);
case 'f':
output_ascii = 0;
break;
+ case 'd':
+ filename = strdup(optarg);
+ break;
case '?':
default:
return usage(argv);