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

To Format the PROFILE output to make it more readable #4794

Closed
Aiee opened this issue Oct 27, 2022 · 3 comments · Fixed by #4814
Closed

To Format the PROFILE output to make it more readable #4794

Aiee opened this issue Oct 27, 2022 · 3 comments · Fixed by #4814
Assignees
Labels
wontfix Solution: this will not be worked on recently

Comments

@Aiee
Copy link
Contributor

Aiee commented Oct 27, 2022

Introduction
Currently, when we profile a query, the storage_detail in the profiling data column is not formatted so it is a very long single line.

We should add indents to it so it is more readable.

-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------
|  4 | Traverse       | 2            | {                                                                                                                      | outputVar: {                                                                     |
|    |                |              | ver: 0, rows: 7, execTime: 706us, totalTime: 4054us                                                                    |   "colNames": [                                                                  |
|    |                |              | step 1: {                                                                                                              |     "v",                                                                         |
|    |                |              | {"127.0.0.1":39735 exec/total/vertices: 926(us)/2850(us)/1,                                                            |     "e"                                                                          |
|    |                |              | total_rpc_time: 3314(us)                                                                                               |   ],                                                                             |
|    |                |              | storage_detail: {GetNeighborsNode:380(us),HashJoinNode:276(us),RelNode:381(us),SingleEdgeNode:101(us),TagNode:102(us)} |   "type": "DATASET",                                                             |
|    |                |              | }                                                                                                                      |   "name": "__Traverse_4"                                                         |
|    |                |              | }                                                                                                                      | }                                                                                |
|    |                |              | }                                                                                                                      | inputVar: __Dedup_2                                                              |
|    |                |              |                                                                                                                        | space: 2                                                                         |
|    |                |              |                                                                                                                        | dedup: true                                                                      |
|    |                |              |                                                                                                                        | limit: -1                                                                        |
|    |                |              |                                                                                                                        | filter:                                                                          |
|    |                |              |                                                                                                                        | orderBy: []                                                                      |
|    |                |              |                                                                                                                        | src: $-._vid                                                                     |
|    |                |              |                                                                                                                        | edgeTypes: []                                                                    |
|    |                |              |                                                                                                                        | edgeDirection: OUT_EDGE                                                          |
|    |                |              |                                                                                                                        | vertexProps: [                                                                   |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "name",                                                                    |
|    |                |              |                                                                                                                        |       "age",                                                                     |
|    |                |              |                                                                                                                        |       "_tag"                                                                     |
|    |                |              |                                                                                                                        |     ],                                                                           |
|    |                |              |                                                                                                                        |     "tagId": 3                                                                   |
|    |                |              |                                                                                                                        |   },                                                                             |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "tagId": 5,                                                                  |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "name",                                                                    |
|    |                |              |                                                                                                                        |       "speciality",                                                              |
|    |                |              |                                                                                                                        |       "_tag"                                                                     |
|    |                |              |                                                                                                                        |     ]                                                                            |
|    |                |              |                                                                                                                        |   },                                                                             |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "tagId": 4,                                                                  |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "name",                                                                    |
|    |                |              |                                                                                                                        |       "_tag"                                                                     |
|    |                |              |                                                                                                                        |     ]                                                                            |
|    |                |              |                                                                                                                        |   }                                                                              |
|    |                |              |                                                                                                                        | ]                                                                                |
|    |                |              |                                                                                                                        | edgeProps: [                                                                     |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "type": 8,                                                                   |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "_dst",                                                                    |
|    |                |              |                                                                                                                        |       "_type",                                                                   |
|    |                |              |                                                                                                                        |       "_rank"                                                                    |
|    |                |              |                                                                                                                        |     ]                                                                            |
|    |                |              |                                                                                                                        |   },                                                                             |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "_dst",                                                                    |
|    |                |              |                                                                                                                        |       "_type",                                                                   |
|    |                |              |                                                                                                                        |       "_rank"                                                                    |
|    |                |              |                                                                                                                        |     ],                                                                           |
|    |                |              |                                                                                                                        |     "type": 6                                                                    |
|    |                |              |                                                                                                                        |   },                                                                             |
|    |                |              |                                                                                                                        |   {                                                                              |
|    |                |              |                                                                                                                        |     "props": [                                                                   |
|    |                |              |                                                                                                                        |       "_dst",                                                                    |
|    |                |              |                                                                                                                        |       "_type",                                                                   |
|    |                |              |                                                                                                                        |       "_rank"                                                                    |
|    |                |              |                                                                                                                        |     ],                                                                           |
|    |                |              |                                                                                                                        |     "type": 7                                                                    |
|    |                |              |                                                                                                                        |   }                                                                              |
|    |                |              |                                                                                                                        | ]                                                                                |
|    |                |              |                                                                                                                        | statProps:                                                                       |
|    |                |              |                                                                                                                        | exprs:                                                                           |
|    |                |              |                                                                                                                        | random: false                                                                    |
|    |                |              |                                                                                                                        | steps:                                                                           |
|    |                |              |                                                                                                                        | vertex filter:                                                                   |
|    |                |              |                                                                                                                        | edge filter:                                                                     |
|    |                |              |                                                                                                                        | if_track_previous_path: false                                                    |
|    |                |              |                                                                                                                        | first step filter:                                                               |
-----+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------
@Aiee Aiee added the type/enhancement Type: make the code neat or more efficient label Oct 27, 2022
@wey-gu
Copy link
Contributor

wey-gu commented Oct 27, 2022

And possibly to align with nebula-studio(save to log rather than csv/json) and console(save to log rather than csv/json) to enable users easier to export this in ASCII way.

  • scenario 1: 500 tags there and there are full tags scanned, the query exceeded the terminal emulator history line, it's not easy for them to share this profile result.(could use console with -e/ -f and redirect stdout, though, not everyone would figure out this way
  • scenario 2: users are some nebula consumer without access with nebula-console(cluster prepared by another team and env is under big company's security rule to prevent from access graphd directly but only via studio), the profile query can only be done in studio but neither screen capture nor json result is readable for now.

@Aiee
Copy link
Contributor Author

Aiee commented Nov 1, 2022

And possibly to align with nebula-studio(save to log rather than csv/json) and console(save to log rather than csv/json) to enable users easier to export this in ASCII way.

  • scenario 1: 500 tags there and there are full tags scanned, the query exceeded the terminal emulator history line, it's not easy for them to share this profile result.(could use console with -e/ -f and redirect stdout, though, not everyone would figure out this way
  • scenario 2: users are some nebula consumer without access with nebula-console(cluster prepared by another team and env is under big company's security rule to prevent from access graphd directly but only via studio), the profile query can only be done in studio but neither screen capture nor json result is readable for now.

These scenarios sound like feature requests to export the query result using the studio.

@wey-gu
Copy link
Contributor

wey-gu commented Nov 1, 2022

And possibly to align with nebula-studio(save to log rather than csv/json) and console(save to log rather than csv/json) to enable users easier to export this in ASCII way.

  • scenario 1: 500 tags there and there are full tags scanned, the query exceeded the terminal emulator history line, it's not easy for them to share this profile result.(could use console with -e/ -f and redirect stdout, though, not everyone would figure out this way
  • scenario 2: users are some nebula consumer without access with nebula-console(cluster prepared by another team and env is under big company's security rule to prevent from access graphd directly but only via studio), the profile query can only be done in studio but neither screen capture nor json result is readable for now.

These scenarios sound like feature requests to export the query result using the studio.

Yes, issue created: vesoft-inc/nebula-studio#332

@jinyingsunny jinyingsunny added wontfix Solution: this will not be worked on recently non-issue and removed non-issue labels Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Solution: this will not be worked on recently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants