Skip to content

dashboard: CPU, memory, diskIO and traffic on the footer#15950

Merged
karalabe merged 12 commits into
ethereum:masterfrom
kurkomisi:dashboard-footer-mem-traff
Jan 23, 2018
Merged

dashboard: CPU, memory, diskIO and traffic on the footer#15950
karalabe merged 12 commits into
ethereum:masterfrom
kurkomisi:dashboard-footer-mem-traff

Conversation

@kurkomisi
Copy link
Copy Markdown
Contributor

  • ChartRow component is created for the responsive equally sized charts.
  • CustomTooltip component is created for the custom display of the active chart sample.
  • The parameter order of the updater functions changed from (prev, update) to (update, prev), because prev is not always needed (i.e. replacer)
  • The appender function now can apply a mapper to the update data.
  • active memory, virtual memory, ingress, egress and CPU are displayed on the footer.
  • Minor code cleanup.

@kurkomisi kurkomisi force-pushed the dashboard-footer-mem-traff branch from 0fdc21b to f4b4204 Compare January 23, 2018 12:48
Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

Almost

Comment thread dashboard/dashboard.go Outdated
systemCPUUsage := gosigar.Cpu{}
systemCPUUsage.Get()
prevRead := metrics.DefaultRegistry.Get("eth/db/chaindata/compact/input").(metrics.Meter).Count()
prevWrite := metrics.DefaultRegistry.Get("eth/db/chaindata/compact/output").(metrics.Meter).Count()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Use var to group and align these.

Comment thread dashboard/dashboard.go Outdated
return db, nil
}

func (db *Dashboard) emptyChartEntries(t time.Time, limit int) ChartEntries {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make this a standalone utility method, then you don't need db for it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, docs pls.

Comment thread dashboard/dashboard.go Outdated
db.charts.ProcessCPU = db.emptyChartEntries(now, processCPUSampleLimit)
db.charts.SystemCPU = db.emptyChartEntries(now, systemCPUSampleLimit)
db.charts.Read = db.emptyChartEntries(now, readSampleLimit)
db.charts.Write = db.emptyChartEntries(now, writeSampleLimit)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move these into the literal definition above.

Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM, will merge on green!

@kurkomisi kurkomisi changed the title dashboard: memory, traffic and CPU on the footer dashboard: CPU, memory, diskIO and traffic on the footer Jan 23, 2018
@karalabe karalabe merged commit 05ade19 into ethereum:master Jan 23, 2018
prestonvanloon pushed a commit to prestonvanloon/go-ethereum that referenced this pull request Apr 2, 2018
)

* dashboard: footer, deep state update

* dashboard: resolve asset path

* dashboard: prevent state update on every reconnection

* dashboard: fix linter issue

* dashboard, cmd: minor UI fix, include commit hash

* dashboard: gitCommit renamed to commit

* dashboard: move the geth version to the right, make commit optional

* dashboard: memory, traffic and CPU on footer

* dashboard: fix merge

* dashboard: CPU, diskIO on footer

* dashboard: rename variables, use group declaration

* dashboard: docs
mariameda pushed a commit to NiluPlatform/go-nilu that referenced this pull request Aug 23, 2018
)

* dashboard: footer, deep state update

* dashboard: resolve asset path

* dashboard: prevent state update on every reconnection

* dashboard: fix linter issue

* dashboard, cmd: minor UI fix, include commit hash

* dashboard: gitCommit renamed to commit

* dashboard: move the geth version to the right, make commit optional

* dashboard: memory, traffic and CPU on footer

* dashboard: fix merge

* dashboard: CPU, diskIO on footer

* dashboard: rename variables, use group declaration

* dashboard: docs
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