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

Enable option to toggle between array and object format #148

Merged
merged 12 commits into from
Jul 3, 2024

Conversation

slabasan
Copy link
Collaborator

@slabasan slabasan commented Apr 5, 2024

Fixes #123

TODO:

  • CTF format specifies valid values for displayTimeUnit as ms or ns. But in PFA, we are converting to microsec. Please check how the value of displayTimeUnit impacts the visualization in Perfetto (if at all). Then this is ready for merge.

Viewable in perfetto (without closing brackets):

{
  "displayTimeUnit": "us",
  "otherData": {

  },
  "traceEvents": [
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174687410.2, "ph": "B"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174689621.8, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174690776.0, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174690855.5, "ph": "E"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174690925.0, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174690992.2, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174691069.5, "ph": "B"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174692209.5, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174693350.2, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174693426.2, "ph": "E"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174693492.8, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174693558.8, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174693634.5, "ph": "B"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174694773.0, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174695913.5, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174695988.0, "ph": "E"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174696054.5, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174696120.2, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174696195.2, "ph": "B"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174697334.5, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174698474.8, "ph": "B"},
    {"name": "bas", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174698551.8, "ph": "E"},
    {"name": "bar", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174698618.5, "ph": "E"},
    {"name": "foo", "cat": "__main__", "pid": 74101, "tid": 74101, "ts": 1712616174698683.8, "ph": "E"},

@slabasan slabasan changed the title Enable option to toggle between array and object format WIP Enable option to toggle between array and object format Apr 5, 2024
@slabasan slabasan changed the title WIP Enable option to toggle between array and object format Enable option to toggle between array and object format Apr 8, 2024
@slabasan slabasan force-pushed the output-object-format branch from 86408a7 to e010649 Compare April 16, 2024 22:02
@slabasan slabasan force-pushed the output-object-format branch from e010649 to ad1b01d Compare April 24, 2024 21:04
@slabasan slabasan force-pushed the output-object-format branch from ad1b01d to bf7187d Compare April 24, 2024 21:12
@tpatki
Copy link
Member

tpatki commented Jul 3, 2024

@alizalisan @loudsun1997

We'll merge after the following tests.

  • Test in Perfetto and with displayTimeUnit
  • Test with compact file format
  • Test with cpu/mem usage to verify that works correctly

@alizalisan
Copy link
Collaborator

@tpatki

All tests are complete. This is ready to merge.

@tpatki
Copy link
Member

tpatki commented Jul 3, 2024

Thanks! Merging.

@tpatki tpatki merged commit 5237fc9 into flux-framework:main Jul 3, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

Add object format for trace files (in addition to JSON Array format)
3 participants