Skip to content

Error having multiple json Files in input directory #116

@en1cc

Description

@en1cc

Hey,
I encountered the following issue with more than one file in the input directory:

root@syseleveneigenbedarf-syseleven-ollispielt.dbl1.rwx-test-node01:~# ll fio-output/
total 96
drwxr-xr-x 2 root root 4096 Jun  6 09:37 ./
drwx------ 9 root root 4096 Jun  6 09:24 ../
-rw-r--r-- 1 root root 7482 Jun  6 09:57 cinder_randrw_10.json
-rw-r--r-- 1 root root 7495 Jun  6 09:39 cinder_randrw_1.json
-rw-r--r-- 1 root root 7488 Jun  6 09:41 cinder_randrw_2.json
-rw-r--r-- 1 root root 7491 Jun  6 09:43 cinder_randrw_3.json
-rw-r--r-- 1 root root 7482 Jun  6 09:45 cinder_randrw_4.json
-rw-r--r-- 1 root root 7495 Jun  6 09:47 cinder_randrw_5.json
-rw-r--r-- 1 root root 7486 Jun  6 09:49 cinder_randrw_6.json
-rw-r--r-- 1 root root 7486 Jun  6 09:51 cinder_randrw_7.json
-rw-r--r-- 1 root root 7484 Jun  6 09:53 cinder_randrw_8.json
-rw-r--r-- 1 root root 7496 Jun  6 09:55 cinder_randrw_9.json
-rw-r--r-- 1 root root 7485 Jun  6 09:17 cinder_randrw.json
root@syseleveneigenbedarf-syseleven-ollispielt.dbl1.rwx-test-node01:~# fio-plot -i fio-output/ -T "RANDRW on cinder blockstorage with ocfs2" -l -r randrw -d 256 -n 4 -f read
Traceback (most recent call last):
  File "/usr/local/bin/fio-plot", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/fio_plot/__init__.py", line 41, in main
    routing_dict[graphtype]["function"](settings, data)
  File "/usr/local/lib/python3.10/dist-packages/fio_plot/fiolib/bar2d.py", line 127, in chart_2dbarchart_jsonlogdata
    return_data = create_bars_and_xlabels(settings, data, ax1, ax3)
  File "/usr/local/lib/python3.10/dist-packages/fio_plot/fiolib/bar2d.py", line 99, in create_bars_and_xlabels
    ax1.set_xticklabels(labels=x_axis, fontsize=fontsize,)
  File "/usr/local/lib/python3.10/dist-packages/matplotlib/axes/_base.py", line 74, in wrapper
    return get_method(self)(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/matplotlib/_api/deprecation.py", line 297, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/matplotlib/axis.py", line 1969, in set_ticklabels
    raise ValueError(
ValueError: The number of FixedLocator locations (10), usually from a call to set_ticks, does not match the number of labels (1).

When there is only one file, i have no problem:

root@syseleveneigenbedarf-syseleven-ollispielt.dbl1.rwx-test-node01:~# fio-plot -i fio-output/ -T "RANDRW on cinder blockstorage with ocfs2" -l -r randrw -d 256 -n 4 -f read

 Saving to file RANDRW-on-cinder-blockstorage-with-ocfs2_2023-06-06_112541_mK.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions