Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

concurix-traceaggregator

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concurix-traceaggregator - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc