-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add new --queries-only flag for best viewport usage and performance #387
Add new --queries-only flag for best viewport usage and performance #387
Conversation
As there are quite many viewport customization flags, it's currently quite tedious to set things for most compact viewport usage, when on some terminal withing a terminal, as it quite often is on the clouds. Other effect is that in this mode we're a bit lighter on the monitored DB, skipping some queries.
I'm not sure adding another CLI option is the way to go because it seems to me that this one is just a shortcut for a bunch of On the other hand, recently, we introduced support for tweaking the UI through a configuration file. At the moment, configuration options are limited to columns (setting their width and possibly hiding them) and currently, part of what you want can be achieved by:
Yet it'd be totally fine to extend the configuration file so as to allow hiding other things as you suggest here. What that suit your needs @kmoppel-cognite? |
@dlax Yes, there are quite some flags for sure, I've been using pg_activity almost every working day for the past 7 or 8 years :) But at the same time I was finally annoyed enough to do a PR as right now it takes almost a minute to set all those flags, when including looking at the help. The config file option is indeed very nice for a more classical workflow, where you have one or few central monitoring nodes - but in my case for example where we have dozen+ different cloud projects with hundreds of DBs, where CLI interactions happen on ephemeral K8s pods, so that for ad-hoc troubleshooting I constantly need to start new pods and set all those 8 or 9 flags to blend out extra noise. Maybe if to just name it better to Wdyt? |
Thank you for clarifying your use cases @kmoppel-cognite; now it seems more reasonable to me. I like the idea of this "minimal" UI that could be enabled through a simple CLI flag. But rather than adding such a flag, I wonder if we could implement some kind of "configuration profiles", e.g. by loading them from (also cc @blogh) |
I like the profile idea. |
@kmoppel-cognite, I implemented the profile idea discussed above in #395. Would you like to take a look and see if it fits your needs? |
@kmoppel-cognite, I finally found the time to work on the profile idea. The master branch already supports user profiles (see https://github.com/dalibo/pg_activity/?tab=readme-ov-file#configuration) and #403 suggests to add built-in profiles. Can you have a look at these changes and tell us if this suits your needs? |
As there are quite many viewport customization flags, it's currently quite tedious to set things for most compact viewport usage, when on some terminal withing a terminal, as it quite often is on the clouds.
Other effect is that in this mode we're a bit lighter on the monitored DB, skipping some queries.