Skip to content

plot.py does not support output generated with --benchmark_repetitions=X #4

Description

@vlovich
py.exe google_benchmark_plot/plot.py -f test.csv -r 'BM_MyTest<uint8_t>'

results in

Traceback (most recent call last):
  File "google_benchmark_plot/plot.py", line 123, in <module>
    main()
  File "google_benchmark_plot/plot.py", line 118, in main
    label_groups[label][args.metric] /= baseline
  File "C:\Python38\lib\site-packages\pandas\core\ops\methods.py", line 101, in f
    result.reindex_like(self, copy=False), verify_is_copy=False
  File "C:\Python38\lib\site-packages\pandas\core\generic.py", line 3856, in reindex_like
    return self.reindex(**d)
  File "C:\Python38\lib\site-packages\pandas\core\series.py", line 4399, in reindex
    return super().reindex(index=index, **kwargs)
  File "C:\Python38\lib\site-packages\pandas\core\generic.py", line 4461, in reindex
    return self._reindex_axes(
  File "C:\Python38\lib\site-packages\pandas\core\generic.py", line 4481, in _reindex_axes
    obj = obj._reindex_with_indexers(
  File "C:\Python38\lib\site-packages\pandas\core\generic.py", line 4524, in _reindex_with_indexers
    new_data = new_data.reindex_indexer(
  File "C:\Python38\lib\site-packages\pandas\core\internals\managers.py", line 1276, in reindex_indexer
    self.axes[axis]._can_reindex(indexer)
  File "C:\Python38\lib\site-packages\pandas\core\indexes\base.py", line 3289, in _can_reindex
    raise ValueError("cannot reindex from a duplicate axis")
ValueError: cannot reindex from a duplicate axis

test.csv contains:

name,iterations,real_time,cpu_time,time_unit,bytes_per_second,items_per_second,label,error_occurred,error_message
"BM_MyTest<uint8_t>/1/0",23578947,39.6876,31.808,ns,,0,,,
"BM_MyTest<uint8_t>/1/0",23578947,32.0808,31.808,ns,,0,,,
"BM_MyTest<uint8_t>/1/0",23578947,30.3521,29.1574,ns,,0,,,
"BM_MyTest<uint8_t>/1/0_mean",3,34.0402,30.9245,ns,,0,,,
"BM_MyTest<uint8_t>/1/0_median",3,32.0808,31.808,ns,,0,,,
"BM_MyTest<uint8_t>/1/0_stddev",3,4.96659,1.53036,ns,,0,,,
"BM_MyTest<uint8_t>/1/0_",3,4.96659,1.53036,ns,,0,,,
"BM_MyTest<uint8_t>_BigO",,3.06507,3.02076,N,,,,,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions