This repository was archived by the owner on Feb 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
This repository was archived by the owner on Feb 1, 2018. It is now read-only.
send other metrics #7
Copy link
Copy link
Open
Description
I'm seeing all this stuff in statsd, but only rate and count in stackdriver for timers/histograms:
var clean_pct = '' + pct;
clean_pct = clean_pct.replace('.', '_').replace('-', 'top');
current_timer_data["count_" + clean_pct] = numInThreshold;
current_timer_data["mean_" + clean_pct] = mean;
current_timer_data[(pct > 0 ? "upper_" : "lower_") + clean_pct] = thresholdBoundary;
current_timer_data["sum_" + clean_pct] = sum;
current_timer_data["sum_squares_" + clean_pct] = sumSquares;
}
sum = cumulativeValues[count-1];
sumSquares = cumulSumSquaresValues[count-1];
mean = sum / count;
var sumOfDiffs = 0;
for (var i = 0; i < count; i++) {
sumOfDiffs += (values[i] - mean) * (values[i] - mean);
}
var mid = Math.floor(count/2);
var median = (count % 2) ? values[mid] : (values[mid-1] + values[mid])/2;
var stddev = Math.sqrt(sumOfDiffs / count);
current_timer_data["std"] = stddev;
current_timer_data["upper"] = max;
current_timer_data["lower"] = min;
current_timer_data["count"] = timer_counters[key];
current_timer_data["count_ps"] = timer_counters[key] / (flushInterval / 1000);
current_timer_data["sum"] = sum;
current_timer_data["sum_squares"] = sumSquares;
current_timer_data["mean"] = mean;
current_timer_data["median"] = median;Metadata
Metadata
Assignees
Labels
No labels