From 79cf5bea114269a75d5b6caa8089f2459d98ef41 Mon Sep 17 00:00:00 2001 From: "Christian G. Warden" Date: Mon, 20 Jul 2015 16:54:32 -0700 Subject: [PATCH] Use Semicolon Separator In Collapsed Output Use semicolon separator in collapsed output for compatibility with FlameGraph. --- lib/input-collapsed.js | 2 +- lib/output-collapsed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/input-collapsed.js b/lib/input-collapsed.js index 9bb10ab..6eaf9fd 100644 --- a/lib/input-collapsed.js +++ b/lib/input-collapsed.js @@ -24,7 +24,7 @@ function CollapsedStreamReader(input, log) return; } - reader.emit('stack', match[1].split(','), + reader.emit('stack', match[1].split(';'), parseInt(match[2], 10)); }); this.csr_carrier.on('end', function () { reader.emit('end'); }); diff --git a/lib/output-collapsed.js b/lib/output-collapsed.js index d3758ae..77e8015 100644 --- a/lib/output-collapsed.js +++ b/lib/output-collapsed.js @@ -22,6 +22,6 @@ exports.emit = function emitCollapsed(args, callback) 'required "output" argument must be a function'); args.stacks.eachStackByCount(function (frames, count) { - process.stdout.write(frames.join(',') + ' ' + count + '\n'); + process.stdout.write(frames.join(';') + ' ' + count + '\n'); }); };