Permalink
Browse files

Sanitize the percentile field by replacing '.' with '_'.

This prevents '99.99' from being split into two directories by
changing it to '99_99'.
  • Loading branch information...
1 parent dd789c7 commit 121c9fbf2330744ac72f0e947b4f75b8879058ef Neil Hooey committed Mar 8, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 stats.js
View
@@ -218,8 +218,10 @@ config.configFile(process.argv[2], function (config, oldConfig) {
mean = sum / numInThreshold;
}
- message += 'stats.timers.' + key + '.mean_' + pct + ' ' + mean + ' ' + ts + "\n";
- message += 'stats.timers.' + key + '.upper_' + pct + ' ' + maxAtThreshold + ' ' + ts + "\n";
+ var clean_pct = '' + pct;
+ clean_pct.replace('.', '_');
+ message += 'stats.timers.' + key + '.mean_' + clean_pct + ' ' + mean + ' ' + ts + "\n";
+ message += 'stats.timers.' + key + '.upper_' + clean_pct + ' ' + maxAtThreshold + ' ' + ts + "\n";
}
timers[key] = [];

0 comments on commit 121c9fb

Please sign in to comment.