Calculate rate for chord diagram over 5 seconds to match link settlement rate calculations
@@ -20,7 +20,7 @@ under the License.
/* global angular Promise */
import { MIN_CHORD_THRESHOLD } from './matrix.js';
-const SAMPLES = 3; // number of snapshots to use for rate calculations
+const SAMPLES = 5; // number of snapshots to use for rate calculations
class ChordData { // eslint-disable-line no-unused-vars
constructor(QDRService, isRate, converter) {
@@ -192,7 +192,8 @@ let calcRate = function (values, last_values, snapshots) {
let last = getValueFor(newest, value);
let rate = (last - first) / elapsed;
- rateValues.push({ingress: value.ingress,
+ rateValues.push({
+ ingress: value.ingress,
egress: value.egress,
address: value.address,
messages: Math.max(rate, MIN_CHORD_THRESHOLD)
