concurix-traceaggregator
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "concurix-traceaggregator", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Aggregation of trace data for the concurix tracer", | ||
@@ -33,3 +33,5 @@ "main": "traceaggregator.js", | ||
}, | ||
"devDependencies": {}, | ||
"devDependencies": { | ||
"tape": "^2.13.3" | ||
}, | ||
"repository": { | ||
@@ -36,0 +38,0 @@ "type": "git", |
@@ -50,3 +50,2 @@ "use strict"; | ||
var lastAction = "" | ||
var blockName = "" | ||
@@ -56,2 +55,3 @@ var lastEnterId = null | ||
var lastIdVisits = 1 | ||
var lastAction | ||
@@ -77,36 +77,17 @@ var bf = new BlockFactory() | ||
isRepeat = false | ||
if (lastEnterId === null && lastExitId === null) { | ||
// first block | ||
blockName += "<" + record.id | ||
} | ||
else if (lastEnterId === lastExitId && lastEnterId === record.id) { | ||
if (lastEnterId !== null && lastEnterId === lastExitId && lastEnterId === record.id) { | ||
// (all ids match) | ||
// debounce naming for a repeated leaf | ||
// debounch naming for repeated leaf | ||
lastIdVisits++ | ||
isRepeat = true | ||
} | ||
else if (lastEnterId === lastExitId && lastEnterId !== record.id) { | ||
// (prev ids match, new differs) | ||
// Exit and enter into same stack depth | ||
if (lastAction === "exit") { | ||
blockName += ">" | ||
else { | ||
if (isRepeat && lastAction == "enter") { | ||
// un-debounce the id | ||
blockName += "<" + lastEnterId | ||
} | ||
if (lastAction === "enter") { | ||
blockName += "<" + lastEnterId + ">" | ||
} | ||
blockName += "<" + record.id | ||
lastIdVisits = 1 | ||
lastExitId = null | ||
isRepeat = false | ||
} | ||
else { | ||
// (all ids differ) | ||
// enter (new stack depth, no exit) | ||
if (lastAction === "exit") { | ||
blockName += ">" | ||
lastExitId = null | ||
} | ||
blockName += "<" + record.id | ||
} | ||
lastEnterId = record.id | ||
@@ -126,3 +107,3 @@ lastAction = "enter" | ||
var prev = miniwf[miniwf.length - 1] | ||
prev.end = record.ts | ||
prev.endTs = record.ts | ||
prev.visits++ | ||
@@ -132,15 +113,7 @@ } | ||
miniwf.push(bf.fn(record.id, enter.ts, record.ts, enter.order)) | ||
blockName += ">" | ||
} | ||
if (lastAction === "exit" && lastEnterId === lastExitId && lastEnterId !== record.id) { | ||
blockName += ">" + record.id | ||
lastIdVisits = 1 | ||
isRepeat = false | ||
} | ||
else if (lastAction === "exit") { | ||
blockName += ">" + record.id | ||
} | ||
lastExitId = record.id | ||
lastAction = "exit" | ||
lastExitId = record.id | ||
} | ||
@@ -159,5 +132,2 @@ | ||
blockName += ">" | ||
miniwf = miniwf.sort(function (a, b) { | ||
@@ -164,0 +134,0 @@ return a.order - b.order |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10085
1
293