bcgov / DBC-APIM

DataBC OPEN API Services
Apache License 2.0
1 stars 0 forks source link

Heartbeat - Scale - Y-axis #42

Closed BK01 closed 7 years ago

BK01 commented 7 years ago

Skills / SW:

Background: https://github.com/bcgov/dbcrss/blob/master/heartbeat/README.md

Description:

Investigate updating the JavaScript to show the charts with a single Y-axis while still maintaining the general shape of the lines. Fork and adjust as necessary. This repo uses both master and gh-pages branch.

Potential references: https://d3js.org/ https://github.com/d3/d3/wiki/Gallery

BK01 commented 7 years ago

No solution identified at this time that would improve the existing chart style.

banders commented 7 years ago

@ll911 @BK01 Rather than prescribing that we need to merge the data sets onto a chart with a single Y axis, perhaps it is better to consider the underlying requirement: Leo mentioned today that we want a graphical display that will allow a system admin to assess the following "at a glance":

  1. Is the app operating normally or is there an outage or is response time poor?
  2. If response time is poor, is it due to network latency, or is it internal to the app itself?

To address question #1, let's change the blue line ("execution time") to "response time" (i.e. total response time).

To address question #2 let's replace the red line ("network latency") with "execution time as fraction of response time" (i.e execution time divided by response time). The right-hand Y axis will be changed to show the fraction (0-1). Downward spikes will indicate above average network latency, and upward spikes will indicate above average execution time within the app itself.

We also have a third line (the purple line). I think we should either remove it, or change the line style to make it clear which axis the line should be interpreted relative to (e.g. a dashed blue line or a dashed red line).

Thoughts?

BK01 commented 7 years ago

@BK01 to research email alert services for Heartbeat. If value = 0, then email alert to DataBC contact. Pass email account to script as parameter from Jnks.

update: already in place for DataBC middleware using Jenkins/Nagios.

BK01 commented 7 years ago

@banders to proceed with proposal for one Heartbeat graph (any is fine). Following review by team, may also be implemented to other graphs (geocoder and route planner)

banders commented 7 years ago

@BK01 @ll911 I have updated the heartbeat graphs as outlined above (mostly).

All graphs have been updated because they share common code.

I have also added some new information above the graphs to clarify exactly what each metric is.

I decided rather than have different left and right axes on the same graph that I would instead put the two data sets on separate graphs (top and bottom). I think it's easier to read this way. I also think it is now fairly simple to quickly assess the two main questions that I outlined in my previous comment. Let me know what you think.

BK01 commented 7 years ago

New graphs look great. Next step, update style reference for other charts (such as /geocoder_pub/).

banders commented 7 years ago

@BK01 @ll911 I fixed the style reference for the other charts. The lines are now blue again.

For example: /geocoder_pub