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

Metrics on canvas #1105

Merged
merged 21 commits into from
Apr 4, 2016
Merged

Metrics on canvas #1105

merged 21 commits into from
Apr 4, 2016

Conversation

foot
Copy link
Contributor

@foot foot commented Mar 3, 2016

screen shot 2016-03-03 at 13 19 01

Fixes #1074

Bugs:

  • Fix metric formatting, either w/ BE support from a metric.format, or a local mapping. It might be good to get metric.label here to keep the metrics consistent w/ the labels in the details panel.
  • Figure out what metrics are actually available to display by re-scanning [node].metrics onAdd/onUpdate.
  • Fix text size
  • Fix 0.0001 displaying a tiny bit of metric-area when it gets rounded away to 0.00
  • Clarify what it means to have an agg node metric. (In metric selector perhaps. avg) -No agg metrics for now.
  • Do we want to show "host cpu" on the processes topo, is that interesting? - No
  • Fixes metric keyboard sorting order.
  • Keep selected metric in the url state.

Features

  • Fade the node border color when a metric is selected to give the metric more emphasis while still (just) keeping the ability to determine a node's rank.
  • <, >, and q kb shortcuts to cycle metrics, like the top command.
  • Different color for different metrics for more easily recognising when cycling.
  • As soon as a metric is non-zero bump up the fill to start at effectively 10% for easier detection of 0/non-zero metrics.
  • Pin / unpin with by re-clicking metric.
  • Log scale for load (50) / open-files (100000) as these don't really have a max, though we are considering ulimit for open-files
  • Update metrics every 3s as the reports come in from the probe. (mocked)
  • Change colors away from green/red/orange.

@foot foot changed the title Metrics on canvas [WIP] Metrics on canvas Mar 3, 2016
@paulbellamy
Copy link
Contributor

The highlight on hover with this seems to also highlight all connected nodes...

@foot
Copy link
Contributor Author

foot commented Mar 7, 2016

Feature!

But will play with that. I guess its not stuff you might necessarily really be interested in, so, distracting.

@paulbellamy
Copy link
Contributor

Need to figure out a better way to do the pruning for the websocket diff. Maybe RenderableNode.Diff(other RenderableNode)?

The js seems to go a bit wonky when the websocket updates arrive. There's a metric on every node with the value NaN after..

@foot
Copy link
Contributor Author

foot commented Mar 9, 2016

Questions

  • How often do we want the metrics to update? It sounded good to have every changed pushed onto the WS, but thats a lot of stuff perhaps.
  • How often does the server get a new value for a metric? every 15s or 3s?
  • We could do something similar to the details panel where we build a buffer up from the BE and stream it out slowly to give the (false) impression of "live" metrics.

@paulbellamy
Copy link
Contributor

How often does the server get a new value for a metric? every 15s or 3s?

Everytime there's a new report so every 3s.

@foot
Copy link
Contributor Author

foot commented Mar 9, 2016

Figure out how we should handle max. at the mo:

  • cpu: max is 100. (is it 200 w/ 2 cores?)
  • load/memory/open fds: the max value in the 15 samples the BE stores?

Does it make sense to try and figure out other values for max, e.g.

  • Total available memory on the system for memory.
  • ulimit for open files?

@paulbellamy
Copy link
Contributor

(is it 200 w/ 2 cores?)

yes

Total available memory on the system for memory. ulimit for open files

Probably, yeah

Edit: but all of that should be encapsulated in the metric's max value.

@foot
Copy link
Contributor Author

foot commented Mar 9, 2016

Nice! #1149 would be pretty great.

I'm not sure about load.

  1. Take the global max of the topo
  2. Choose a very large value like 100 and use a log scale for the fill/bar.

A log scale could work for open files too as the max is probably something v.large.

@foot foot force-pushed the metrics-on-canvas branch from 855c08b to 7672ed8 Compare March 10, 2016 11:09
@paulbellamy
Copy link
Contributor

Upon reflection, I'm not convinced the PruneWithMetrics hack will work for this. Needs revisiting.

@paulbellamy
Copy link
Contributor

  • Figure out how to send the metric summaries in deltas and topologies updates
  • Only send the last/latest value for metrics in the summaries

@foot foot force-pushed the metrics-on-canvas branch 4 times, most recently from 824dfb6 to 97d82ca Compare March 21, 2016 18:23
@foot foot force-pushed the metrics-on-canvas branch 2 times, most recently from 335dcb1 to 2863ad3 Compare March 30, 2016 09:24
@foot foot force-pushed the metrics-on-canvas branch 2 times, most recently from 0a6fb4f to 5b53cd8 Compare March 30, 2016 16:41
@foot foot changed the title [WIP] Metrics on canvas Metrics on canvas Mar 31, 2016
@foot
Copy link
Contributor Author

foot commented Mar 31, 2016

rfr @davkal

Just the JS code in this branch in the end.

AppDispatcher.dispatch({
type: ActionTypes.PIN_METRIC,
metricId,
metricType: AppStore.getAvailableCanvasMetricsTypes()[metricId]

This comment was marked as abuse.

/* cloud paths have stroke-width set dynamically */
&:not(.shape-cloud) .border {
stroke-width: @node-border-stroke-width;
fill: @background-color;
transition: stroke-opacity 0.5s cubic-bezier(0,0,0.21,1), fill 0.5s cubic-bezier(0,0,0.21,1);

This comment was marked as abuse.

This comment was marked as abuse.

@davkal
Copy link
Contributor

davkal commented Apr 1, 2016

All works well and looks good.

My personal nit would be the fill color. I feel it's too strong. Maybe use getNodeColorDark for more consistent coloring and try a lower opacity for a lighter feel. Or add a new getNodeColorLight that corrects lightness in the manner getNodeColorDark, just the towards consistent lightness.

@foot foot force-pushed the metrics-on-canvas branch from 2e273f8 to fb40e54 Compare April 4, 2016 15:48
foot added 19 commits April 4, 2016 17:48
- Adds metric on canvas support for more shapes
- More variation from the debug bar.
Locks onto a metric after you mouseout.
- change color to bg
- show "x" to remove the metric.
- Small debugToolbar enhancements.
- Remove node's grey-inner-border when showing metrics
- Bump non-zero metrics up to start at 10% fill so we can see them.
- Fade out rank color opacity when showing metric
Going w/ the `top` key mappings, needs discussion.
- Bring MoC under new linting rules
- adds support for immutable-console-renderer
- fixes up metrics actually displaying after bad fixes when rebasing.
- Mock all metrics client side for demoing
- Fixes metric keyboard selection order
- introduces "metric type" so we can flick across topos and keep the
  "type" of metric selected. Cheating and using label as the type atm.
- Fixes metric font-size on selected nodes
- Round metric-height value to be the same as rounded displayed value.
- No red/green colors in the MoC! They have to much association w/ success/failure
- no rand ids, org code
- Fixes tests, no .includes in jest for now
- Small comment on moc stuff
- Patch up differences after MoC rebase
In meetings etc the term pin is more often used.
@foot foot force-pushed the metrics-on-canvas branch from fb40e54 to 96789da Compare April 4, 2016 15:49
foot added 2 commits April 4, 2016 21:02
- Refactor some things.
- Fixes heptagon moc rendering
- Experiment w/ duller colors.
@foot foot force-pushed the metrics-on-canvas branch from 96789da to 4ec9750 Compare April 4, 2016 19:03
@foot foot merged commit c9b323f into master Apr 4, 2016
@foot foot deleted the metrics-on-canvas branch April 5, 2016 11:19
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.

3 participants