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

Revamp the infos in the header #258

Merged
merged 1 commit into from
Jan 13, 2022
Merged

Conversation

blogh
Copy link
Collaborator

@blogh blogh commented Dec 13, 2021

This patch aims to expand and revamp the information present in the
header. The informations is now split in tree groups.

Instance info:

  • Add more instance informations: utptime, and revamp the existing info;
  • Add session status info;
  • can be toggle with the i key.

Worker info:

  • Add the worker count info: for parallelism / logical replication but also
    autovacuum, walsender, and walreceiver;
  • can be toggle with the w key.

System info:

  • Reformat the sytem information.
  • can be toggle with the s key.

Any combination of theses groups can be active at a given time.

(related to see #213)

@blogh
Copy link
Collaborator Author

blogh commented Dec 13, 2021

Still WIP, with no test yet.

Copy link
Member

@dlax dlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work so far. Just noted a few things after a quick read but no real blocker :)

I'll do a more in-depth review when this will be ready on your side.

pgactivity/data.py Outdated Show resolved Hide resolved
pgactivity/types.py Outdated Show resolved Hide resolved
pgactivity/views.py Outdated Show resolved Hide resolved
pgactivity/views.py Outdated Show resolved Hide resolved
pgactivity/activities.py Outdated Show resolved Hide resolved
@blogh
Copy link
Collaborator Author

blogh commented Dec 15, 2021

@dlax : I wonder if it's necessary to have two separate functions + queries for pg_get_db_info and pg_get_server_activity, while we could easily do everything in one go (since everything is used only in the header) and fetch everything into a single object.

@dlax
Copy link
Member

dlax commented Dec 16, 2021

I wonder if it's necessary to have two separate functions + queries for pg_get_db_info and pg_get_server_activity, while we could easily do everything in one go (since everything is used only in the header) and fetch everything into a single object.

Agreed.

@blogh blogh force-pushed the more_info_in_header branch from 164fedc to cce3401 Compare December 16, 2021 21:57
pgactivity/types.py Outdated Show resolved Hide resolved
@blogh blogh force-pushed the more_info_in_header branch 2 times, most recently from eea1b9a to e8c58ce Compare January 6, 2022 15:31
tests/test_data.py Outdated Show resolved Hide resolved
pgactivity/types.py Outdated Show resolved Hide resolved
tests/test_data.py Outdated Show resolved Hide resolved
@blogh blogh force-pushed the more_info_in_header branch from fbb7c22 to 41c0b3b Compare January 7, 2022 10:09
pgactivity/types.py Outdated Show resolved Hide resolved
@blogh blogh force-pushed the more_info_in_header branch from 339b7e3 to abd14d5 Compare January 7, 2022 17:08
@blogh blogh marked this pull request as ready for review January 10, 2022 10:41
@blogh blogh force-pushed the more_info_in_header branch from 157a970 to f3f99a3 Compare January 10, 2022 11:30
@blogh
Copy link
Collaborator Author

blogh commented Jan 10, 2022

Rebased.

@blogh blogh requested a review from dlax January 10, 2022 11:31
Copy link
Member

@dlax dlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting minor improvements. LGTM overall.

Commits should be squashed before merging, also.

pgactivity/activities.py Outdated Show resolved Hide resolved
pgactivity/types.py Outdated Show resolved Hide resolved
pgactivity/types.py Outdated Show resolved Hide resolved
pgactivity/ui.py Outdated Show resolved Hide resolved
pgactivity/ui.py Outdated Show resolved Hide resolved
pgactivity/cli.py Outdated Show resolved Hide resolved
pgactivity/types.py Show resolved Hide resolved
tests/test_data.py Outdated Show resolved Hide resolved
Copy link
Member

@dlax dlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added an extra commit to hide the "i" key from help when not in local mode.

LGTM otherwise. Can you rework the git history before we merge this?

This patch aims to expand and revamp the information present in the
header. The informations is now split in tree groups.

Instance info:
* Add more instance informations: utptime, and revamp the existing info;
* Add session status info;
* Add activity profile info;
* can be toggle with the i key.

Worker info:
* Add the worker count info: for parallelism / logical replication but also
  autovacuum, walsender, and walreceiver;
* can be toggle with the w key.

System info:
* Reformat the sytem information.
* can be toggle with the s key.

Any combination of theses groups can be active at a given time.
@blogh blogh force-pushed the more_info_in_header branch from 54f46d2 to c0b8791 Compare January 13, 2022 09:21
@blogh
Copy link
Collaborator Author

blogh commented Jan 13, 2022

Added the new parameters in the man page and fixed the "process" name there (=> "worker process").
Squashed.

@blogh
Copy link
Collaborator Author

blogh commented Jan 13, 2022

I think it's good to merge now.

I dont get which review change It's complaining about...

@blogh blogh merged commit 03068d4 into dalibo:master Jan 13, 2022
@blogh blogh deleted the more_info_in_header branch September 16, 2022 12:48
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.

2 participants