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

Refactor summaries of visor #757

Closed
jdknives opened this issue May 5, 2021 · 0 comments
Closed

Refactor summaries of visor #757

jdknives opened this issue May 5, 2021 · 0 comments

Comments

@jdknives
Copy link
Member

jdknives commented May 5, 2021

Original comment from @i-hate-nicknames :

There are multiple levels of extra that seems to have been added over time. Visor has summary and extra summary, and hypervisor has his own extra summary, plus response wrappers around visor summaries:
hypervisor provides:

  1. visor.Summary (via getVisor()), wraps in summaryResp
  2. visor.ExtraSummary (via getVisorSummary()), wraps in extraSummaryResp
  3. its own extra summary (extra-extra now?) (via getVisorsExtraSummary()), extraSummaryWithDmsgResp
    There are some overlaps between those structures but not always, e.g. visor.ExtraSummary Dmsg is different from Dmsg in extraSummaryWithDmsgResp. So we cannot simply embed one into other.

I would propose:

  1. Remove Dmsg from visor.ExtraSummary. This field is not populated by visor api, so there is no reason to have it there.
  2. Investigate why do we need dmsg stats for all visors in getVisorSummary, since we are asking for stats of a single visor.
    In case we don't need that data, extraSummaryWithDmsgResp and extraSummaryResp become equivalent and the former
    can be removed
  3. Factor out TCPAddr and Online fields into its own struct, maybe smth like NetworkStats?
  4. Rename summary to overview like @jdknives suggested, and extra summary to just summary
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

No branches or pull requests

1 participant