zalando / pg_view

Get a detailed, real-time view of your PostgreSQL database and system metrics
https://pypi.python.org/pypi/pg-view
Other
494 stars 49 forks source link

Refactor to psutil, structurized project #71

Closed rsiera closed 7 years ago

rsiera commented 7 years ago

This is long-needed major rewrite that splits the single multi-thousand lines file into smaller modules. Adds use of psutil in the process.

LappleApple commented 7 years ago

Hey @alexeyklyukin, do you plan to merge @rsiera's PR? LMK, and I'll give it a Zappr thumbs-up.

rsiera commented 7 years ago

@alexeyklyukin Did you have time to check this PR ? Maybe I'll create PR to different branch like phase_2 or something, because this one is blocking the next ones, which include test and adding psutil to the project.

alexeyklyukin commented 7 years ago

@rsiera Apologizes, I was away and couldn't merge it. I will review it until Friday.

rsiera commented 7 years ago

Thank for code-review ! I have applied all suggestions, except this one with setup_loggers, because I wasn't sure how to do that. If I understood correctly, the change was about to extract body of setup_loggers function to module definition, but how then can I pass options which contains required 'verbose' flag useful to configure logger ?

alexeyklyukin commented 7 years ago

I think it makes sense to separate part of the logger that is configured based on command-line options from the rest of it. I've made a PR: https://github.com/rsiera/pg_view/pull/6

alexeyklyukin commented 7 years ago

I also created another one to move global definitions around. It fixes the issue of not being able to toggle freeze or display of auxiliary processes. https://github.com/rsiera/pg_view/pull/7

rsiera commented 7 years ago

Yes, my mistake. Both PR are merged, thanks.

alexeyklyukin commented 7 years ago

👍

a1exsh commented 7 years ago

:+1:

alexeyklyukin commented 7 years ago

@rsiera merged, thanks a lot for your efforts and perseverance.

LappleApple commented 7 years ago

Great collaboration and persistence, all :)