Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report generation error - KeyError: 'used' when loading dstat data #2246

Open
hzJamesTsao opened this issue Dec 6, 2024 · 1 comment
Open

Comments

@hzJamesTsao
Copy link

hzJamesTsao commented Dec 6, 2024

Create new benchmark and tried to run the default test.yaml. Infrastructure can be setup successfully, load generators ran successfully but encountered the following during report generation

INFO  14:54:14 	Loading runs/read_only/06-12-2024_14-48-12/A1_dstat.csv
Traceback (most recent call last):
  File "/Users/jtsao/Development/hazelcast-simulator/venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
    return self._engine.get_loc(casted_key)
      
     ^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^
  File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 
'used'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jtsao/Development/hazelcast-simulator/bin/../src/perftest_cli.py", line 63, in <module>
    PerftestCli()
  File "/Users/jtsao/Development/hazelcast-simulator/bin/../src/perftest_cli.py", line 37, in __init__
    getattr(self, args.command)()
  File "/Users/jtsao/Development/hazelcast-simulator/bin/../src/perftest_cli.py", line 58, in report
    PerfTestReportCli(sys.argv[2:])
  File "/Users/jtsao/Development/hazelcast-simulator/src/simulator/perftest_report.py", line 263, in __init__
    df = analyze(config)
         ^^^^^^^^^^^^^^^
  File "/Users/jtsao/Development/hazelcast-simulator/src/simulator/perftest_report.py", line 35, in analyze
    tmp_df = analyze_run(config, run_dir, run_label)
             
^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^
  File "/Users/jtsao/Development/hazelcast-simulator/src/simulator/perftest_report.py", line 70, in analyze_run
    df_dstat = analyze_dstat(run_dir, attributes)
            
   ^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
  File "/Users/jtsao/Development/hazelcast-simulator/src/simulator/perftest_report_dstat.py", line 26, in analyze_dstat
    multiple_by(df, 1000, 'used', 'free', 'buff', 'cach')
  File "/Users/jtsao/Development/hazelcast-simulator/src/simulator/perftest_report_common.py", line 15, in multiple_by
    df[column_name] = df[column_name] * amount
              
        ~~^^^^^^^^^
^^^^
  File "/Users/jtsao/Development/hazelcast-simulator/venv/lib/python3.11/site-packages/pandas/core/frame.py", line 4102, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^
^^^^^^^^^^^^^^^^^^^
^^
  File "/Users/jtsao/Development/hazelcast-simulator/venv/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
    raise KeyError(key) from err
KeyError: 'used'

Using python 3.11.11

requirements.txt
tests.txt

@hzJamesTsao
Copy link
Author

hzJamesTsao commented Dec 6, 2024

Problem resolved by switching to commit 21c485f (with help from @gbarnett-hz)
I was able to run perftest report successfully using the pervious collected rawdata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant