Skip to content

Commit 171f77a

Browse files
authored
Create example_background_usage.js
1 parent 900e3e9 commit 171f77a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Background Script: example usage for PercentileMetrics
2+
(function() {
3+
var util = new PercentileMetrics();
4+
var out = util.resolutionPercentiles({
5+
windowDays: 30,
6+
groupField: 'assignment_group',
7+
percentiles: [0.5, 0.9, 0.95]
8+
});
9+
10+
out.forEach(function(r) {
11+
gs.info('Group=' + r.group + ' count=' + r.count + ' avg=' + r.avgMins + 'm P50=' + r.p['0.5'] + 'm P90=' + r.p['0.9'] + 'm P95=' + r.p['0.95'] + 'm');
12+
});
13+
})();

0 commit comments

Comments
 (0)