@lensmcp/memory-tracker 1.22.3 → 1.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/emit.js +1 -1
- package/package.json +2 -2
package/lib/emit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var n=(t,e)=>m(t,"name",{value:e,configurable:!0});var I=Object.defineProperty,o=n((t,e)=>I(t,"name",{value:e,configurable:!0}),"n");let
|
|
1
|
+
"use strict";var m=Object.defineProperty;var n=(t,e)=>m(t,"name",{value:e,configurable:!0});var I=Object.defineProperty,o=n((t,e)=>I(t,"name",{value:e,configurable:!0}),"n");const c=Date.now().toString(36)+Math.random().toString(36).slice(2,8);let a=0;function r(t){return a=(a+1)%16777215,`${t}-${c}-${a.toString(36)}`}n(r,"d"),o(r,"memId");function d(t,e){return{sessionId:e?.sessionId??t.sessionId,...e?.flowId?{flowId:e.flowId}:{},...e?.requestId?{requestId:e.requestId}:{},...e?.originNodeId?{originNodeId:e.originNodeId}:{}}}n(d,"s"),o(d,"baseContext");export function emitMutation(t){const{options:e}=t,i={id:r("memmut"),sessionId:t.context?.sessionId??e.sessionId,timestamp:t.timestamp??s(),source:"memory",category:"memory",severity:"debug",context:d(e,t.context),fingerprint:`memory-mutation:${t.ownerId}:${t.operation}`,title:`${t.operation} ${t.ownerId}`,raw:{kind:"memory-mutation",mutation:{ownerNodeId:t.ownerId,operation:t.operation,beforeCount:t.beforeCount,afterCount:t.afterCount,estimatedDeltaBytes:t.estimatedDeltaBytes,keyPreview:t.keyPreview}}};e.sink(i)}n(emitMutation,"emitMutation"),o(emitMutation,"emitMutation");export function emitRetention(t){const{options:e}=t,i={id:r("memret"),sessionId:t.context?.sessionId??e.sessionId,timestamp:t.timestamp??s(),source:"memory",category:"memory",severity:"warning",context:{...d(e,t.context),flowId:t.flowId},fingerprint:`memory-retention:${t.ownerId}`,title:`Suspected leak: ${t.ownerId} grew by ${t.growth} and did not shrink`,raw:{kind:"memory-retention",retention:{ownerId:t.ownerId,flowId:t.flowId,startCount:t.startCount,endCount:t.endCount,growth:t.growth}}};e.sink(i)}n(emitRetention,"emitRetention"),o(emitRetention,"emitRetention");export function emitStaleGeneration(t){const{options:e}=t,i={id:r("memstale"),sessionId:e.sessionId,timestamp:t.timestamp??s(),source:"memory",category:"memory",severity:"warning",context:{sessionId:e.sessionId},fingerprint:`memory-stale-generation:${t.logicalId}`,title:`Stale generation retained: ${t.logicalId} gen ${t.generation} holds ${t.retainedBytes} bytes`,raw:{kind:"singleton-stale-generation",staleGeneration:{logicalId:t.logicalId,instanceId:t.instanceId,generation:t.generation,retainedBytes:t.retainedBytes}}};e.sink(i)}n(emitStaleGeneration,"emitStaleGeneration"),o(emitStaleGeneration,"emitStaleGeneration");function s(){return Date.now()}n(s,"r"),o(s,"nowMs");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lensmcp/memory-tracker",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lensmcp/protocol-types": "1.22.
|
|
17
|
+
"@lensmcp/protocol-types": "1.22.5",
|
|
18
18
|
"tslib": "^2.3.0"
|
|
19
19
|
},
|
|
20
20
|
"license": "Apache-2.0",
|