louwrentius / fio-plot

Create charts from FIO storage benchmark tool output
BSD 3-Clause "New" or "Revised" License
370 stars 87 forks source link

Error handling of missing parameters and target paths is missing #25

Closed louwrentius closed 4 years ago

louwrentius commented 4 years ago
nan03@Mini:~/projects/fio-plot/fio_plot$ ./fio_plot -i ../benchmark_script/benchmarks/sda1/4k/ -T "Title" -s https://louwrentius.com -l -n 1 -r randread
Traceback (most recent call last):
  File "./fio_plot", line 141, in <module>
    main()
  File "./fio_plot", line 125, in main
    list_of_json_files = jsonimport.list_json_files(settings)
  File "/Users/nan03/projects/fio-plot/fio_plot/fiolib/jsonimport.py", line 11, in list_json_files
    files = os.listdir(absolute_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/nan03/projects/fio-plot/benchmark_script/benchmarks/sda1/4k'
louwrentius commented 4 years ago
Traceback (most recent call last):
  File "./fio_plot", line 141, in <module>
    main()
  File "./fio_plot", line 105, in main
    if settings['type'][0] not in ['iops', 'lat']:
TypeError: 'NoneType' object is not subscriptable
louwrentius commented 4 years ago

When the -r parameter is not supplied:

Traceback (most recent call last):
  File "./fio_plot", line 151, in <module>
    main()
  File "./fio_plot", line 135, in main
    list_of_json_files = jsonimport.list_json_files(settings)
  File "/Users/nan03/projects/fio-plot/fio_plot/fiolib/jsonimport.py", line 15, in list_json_files
    if item.startswith(settings['rw']):
TypeError: startswith first arg must be str or a tuple of str, not NoneType
louwrentius commented 4 years ago

If the -t parameter is not supplied:

Traceback (most recent call last):
  File "./fio_plot", line 151, in <module>
    main()
  File "./fio_plot", line 115, in main
    if settings['type'][0] not in ['iops', 'lat']: