Skip to content

Conversation

bhufmann
Copy link
Contributor

@bhufmann bhufmann commented Aug 20, 2025

What it does

  • Introduce --pretty option to pretty print result models
    By default, the models will be printed as JSON object. Using --pretty the result will be pretty printed, for example, the tables will be printed as tables or trees as table tree.
  • Pretty-print virtual table as table (similarly to data trees), for example:
image

Add option to print virtual table as json (--print-json)

How to test

Run following command on an open experiment:

./tsp_cli_client --get-virtual-table-lines org.eclipse.tracecompass.internal.provisional.tmf.core.model.events.TmfEventTableDataProvider --uuid <exp_uuid> --table-line-index 0 --table-line-count 5 --pretty

Note: It will also fetch the table headers and show them in the resulting table.

To print the lines as JSON

./tsp_cli_client --get-virtual-table-lines org.eclipse.tracecompass.internal.provisional.tmf.core.model.events.TmfEventTableDataProvider --uuid <exp_uuid> --table-line-index 0 --table-line-count 5

Replace the <exp_uuid> with the experiment uuid to test.

Follow-ups

Add an option to print it as a plain text output line by line or print to csv file.

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

@bhufmann bhufmann force-pushed the print_table_using_panda branch from 3054b8e to 8810b02 Compare August 20, 2025 20:10
@bhufmann bhufmann force-pushed the print_table_using_panda branch 2 times, most recently from 3277724 to 7630264 Compare October 2, 2025 20:26
By default, the models will be printed as JSON object. Using --pretty
the result will be pretty printed, for example, the tables will be
printed as tables or trees as table tree.

Add json encoder for virtual table lines and headers

Signed-off-by: Bernd Hufmann <[email protected]>
@bhufmann bhufmann force-pushed the print_table_using_panda branch from 7630264 to beae082 Compare October 3, 2025 12:49
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.

1 participant