per4m icon indicating copy to clipboard operation
per4m copied to clipboard

`viztracer_metadata` KeyError when using output of perf2trace with viztracer --combine

Open bwindsor opened this issue 2 years ago • 1 comments

I'm getting the same issue described here, where it is suggested that per4m should be updated to be compatible with the latest version of viztracer: https://github.com/gaogaotiantian/viztracer/issues/208

The json file produced by per4m perf2trace is no longer compatible with viztracer --combine due to the viztracer_metadata key being missing.

If I manually edit the json output by per4m perf2trace to add a viztracer_metadata key with no content, then viztracer --combine works again.

An easy solution to this would be to simply to include an empty viztracer_metadata key in the json output of perf2trace. What do you think? I can try creating a PR if that would be helpful.

bwindsor avatar Jan 24 '23 13:01 bwindsor

As a workaround, you can also downgrade viztracer:

pip install viztracer==0.14.1

gukoff avatar May 22 '24 11:05 gukoff