projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix variable shadowing
[fio.git]
/
stat.c
diff --git
a/stat.c
b/stat.c
index 98ab63893900bcc09ba9a5be785dceffa30b1fff..5b49dddbb1d0786341902bd4a2b75271db30f466 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-1,10
+1,7
@@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
-#include <dirent.h>
-#include <libgen.h>
#include <math.h>
#include "fio.h"
#include <math.h>
#include "fio.h"
@@
-365,7
+362,7
@@
static void stat_calc_lat(struct thread_stat *ts, double *dst,
* To keep the terse format unaltered, add all of the ns latency
* buckets to the first us latency bucket
*/
* To keep the terse format unaltered, add all of the ns latency
* buckets to the first us latency bucket
*/
-void stat_calc_lat_nu(struct thread_stat *ts, double *io_u_lat_u)
+
static
void stat_calc_lat_nu(struct thread_stat *ts, double *io_u_lat_u)
{
unsigned long ntotal = 0, total = ddir_rw_sum(ts->total_io_u);
int i;
{
unsigned long ntotal = 0, total = ddir_rw_sum(ts->total_io_u);
int i;
@@
-673,7
+670,6
@@
static int calc_block_percentiles(int nr_block_infos, uint32_t *block_infos,
if (len > 1)
qsort((void *)plist, len, sizeof(plist[0]), double_cmp);
if (len > 1)
qsort((void *)plist, len, sizeof(plist[0]), double_cmp);
- nr_uninit = 0;
/* Start only after the uninit entries end */
for (nr_uninit = 0;
nr_uninit < nr_block_infos
/* Start only after the uninit entries end */
for (nr_uninit = 0;
nr_uninit < nr_block_infos
@@
-1402,7
+1398,7
@@
static struct json_object *show_thread_status_json(struct thread_stat *ts,
if (ts->ss_dur) {
struct json_object *data;
struct json_array *iops, *bw;
if (ts->ss_dur) {
struct json_object *data;
struct json_array *iops, *bw;
- int
i, j, k
;
+ int
j, k, l
;
char ss_buf[64];
snprintf(ss_buf, sizeof(ss_buf), "%s%s:%f%s",
char ss_buf[64];
snprintf(ss_buf, sizeof(ss_buf), "%s%s:%f%s",
@@
-1438,8
+1434,8
@@
static struct json_object *show_thread_status_json(struct thread_stat *ts,
j = ts->ss_head;
else
j = ts->ss_head == 0 ? ts->ss_dur - 1 : ts->ss_head - 1;
j = ts->ss_head;
else
j = ts->ss_head == 0 ? ts->ss_dur - 1 : ts->ss_head - 1;
- for (
i = 0; i < ts->ss_dur; i
++) {
- k = (j +
i
) % ts->ss_dur;
+ for (
l = 0; l < ts->ss_dur; l
++) {
+ k = (j +
l
) % ts->ss_dur;
json_array_add_value_int(bw, ts->ss_bw_data[k]);
json_array_add_value_int(iops, ts->ss_iops_data[k]);
}
json_array_add_value_int(bw, ts->ss_bw_data[k]);
json_array_add_value_int(iops, ts->ss_iops_data[k]);
}
@@
-1944,13
+1940,6
@@
void __show_run_stats(void)
free(opt_lists);
}
free(opt_lists);
}
-void show_run_stats(void)
-{
- fio_sem_down(stat_sem);
- __show_run_stats();
- fio_sem_up(stat_sem);
-}
-
void __show_running_run_stats(void)
{
struct thread_data *td;
void __show_running_run_stats(void)
{
struct thread_data *td;