@memlab/core 1.1.41 → 1.1.43
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/dist/__tests__/lib/TestUtils.js +4 -3
- package/dist/__tests__/utils/TagParser.test.d.ts +11 -0
- package/dist/__tests__/utils/TagParser.test.d.ts.map +1 -0
- package/dist/__tests__/utils/TagParser.test.js +78 -0
- package/dist/__tests__/utils/{utils.test.d.ts → Utils.test.d.ts} +1 -1
- package/dist/__tests__/utils/Utils.test.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/lib/Config.d.ts +2 -0
- package/dist/lib/Config.d.ts.map +1 -1
- package/dist/lib/Config.js +24 -20
- package/dist/lib/Console.d.ts.map +1 -1
- package/dist/lib/Console.js +3 -0
- package/dist/lib/FileManager.d.ts.map +1 -1
- package/dist/lib/FileManager.js +4 -5
- package/dist/lib/HeapAnalyzer.js +8 -8
- package/dist/lib/HeapParser.js +6 -6
- package/dist/lib/InternalValueSetter.js +2 -2
- package/dist/lib/NodeHeap.js +5 -4
- package/dist/lib/Serializer.d.ts.map +1 -1
- package/dist/lib/Serializer.js +9 -3
- package/dist/lib/StringLoader.d.ts +1 -0
- package/dist/lib/StringLoader.d.ts.map +1 -1
- package/dist/lib/Types.d.ts +68 -53
- package/dist/lib/Types.d.ts.map +1 -1
- package/dist/lib/Utils.d.ts +6 -0
- package/dist/lib/Utils.d.ts.map +1 -1
- package/dist/lib/Utils.js +199 -26
- package/dist/lib/heap-data/HeapEdge.d.ts.map +1 -1
- package/dist/lib/heap-data/HeapLocation.d.ts.map +1 -1
- package/dist/lib/heap-data/HeapNode.d.ts.map +1 -1
- package/dist/lib/heap-data/HeapNode.js +2 -1
- package/dist/lib/heap-data/HeapUtils.js +2 -2
- package/dist/lib/leak-filters/BaseLeakFilter.rule.js +1 -1
- package/dist/lib/trace-filters/BaseTraceFilter.rule.js +1 -1
- package/dist/logger/LeakClusterLogger.js +2 -2
- package/dist/paths/TraceFinder.d.ts.map +1 -1
- package/dist/paths/TraceFinder.js +3 -2
- package/dist/trace-cluster/ClusterUtils.d.ts.map +1 -1
- package/dist/trace-cluster/ClusterUtilsHelper.d.ts.map +1 -1
- package/dist/trace-cluster/ClusterUtilsHelper.js +2 -2
- package/dist/trace-cluster/ClusteringHeuristics.d.ts.map +1 -1
- package/dist/trace-cluster/EvalutationMetric.d.ts.map +1 -1
- package/dist/trace-cluster/strategies/machine-learning/DistanceMatrix.d.ts +1 -1
- package/dist/trace-cluster/strategies/machine-learning/DistanceMatrix.d.ts.map +1 -1
- package/dist/trace-cluster/strategies/machine-learning/HAC.d.ts +1 -1
- package/dist/trace-cluster/strategies/machine-learning/HAC.d.ts.map +1 -1
- package/dist/trace-cluster/strategies/machine-learning/Ngram.js +2 -1
- package/package.json +1 -1
- package/dist/__tests__/utils/utils.test.d.ts.map +0 -1
- /package/dist/__tests__/utils/{utils.test.js → Utils.test.js} +0 -0
package/dist/lib/Utils.js
CHANGED
|
@@ -24,23 +24,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
24
24
|
}) : function(o, v) {
|
|
25
25
|
o["default"] = v;
|
|
26
26
|
});
|
|
27
|
-
var __importStar = (this && this.__importStar) ||
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
44
34
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
45
35
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
46
36
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -54,8 +44,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
54
44
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
55
45
|
};
|
|
56
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
-
exports.resolveSnapshotFilePath =
|
|
58
|
-
exports.runShell = runShell;
|
|
47
|
+
exports.runShell = exports.resolveSnapshotFilePath = void 0;
|
|
59
48
|
const fs_1 = __importDefault(require("fs"));
|
|
60
49
|
const path_1 = __importDefault(require("path"));
|
|
61
50
|
const child_process_1 = __importDefault(require("child_process"));
|
|
@@ -246,6 +235,7 @@ const svgElementRegex = /^SVG.*Element$/;
|
|
|
246
235
|
const htmlCollectionRegex = /^HTML.*Collection$/;
|
|
247
236
|
const cssElementRegex = /^CSS/;
|
|
248
237
|
const styleSheetRegex = /StyleSheet/;
|
|
238
|
+
const newDOMNodeRegex = /^<[a-zA-Z]+.*>$/;
|
|
249
239
|
// special DOM element names that are not
|
|
250
240
|
// included in the previous regex definitions
|
|
251
241
|
const domElementSpecialNames = new Set([
|
|
@@ -266,12 +256,14 @@ function isDOMNodeIncomplete(node) {
|
|
|
266
256
|
if (name.startsWith(detachedPrefix)) {
|
|
267
257
|
name = name.substring(detachedPrefix.length);
|
|
268
258
|
}
|
|
259
|
+
name = name.trim();
|
|
269
260
|
return (htmlElementRegex.test(name) ||
|
|
270
261
|
svgElementRegex.test(name) ||
|
|
271
262
|
cssElementRegex.test(name) ||
|
|
272
263
|
styleSheetRegex.test(name) ||
|
|
273
264
|
htmlCollectionRegex.test(name) ||
|
|
274
|
-
domElementSpecialNames.has(name)
|
|
265
|
+
domElementSpecialNames.has(name) ||
|
|
266
|
+
newDOMNodeRegex.test(name));
|
|
275
267
|
}
|
|
276
268
|
function isXMLDocumentNode(node) {
|
|
277
269
|
return node.type === 'native' && node.name === 'XMLDocument';
|
|
@@ -587,7 +579,7 @@ function checkScenarioInstance(s) {
|
|
|
587
579
|
(s.beforeInitialPageLoad &&
|
|
588
580
|
typeof s.beforeInitialPageLoad !== 'function') ||
|
|
589
581
|
(s.setup && typeof s.setup !== 'function')) {
|
|
590
|
-
throw new Error('Invalid
|
|
582
|
+
throw new Error('Invalid scenario');
|
|
591
583
|
}
|
|
592
584
|
return s;
|
|
593
585
|
}
|
|
@@ -803,6 +795,182 @@ function extractFiberNodeInfo(node) {
|
|
|
803
795
|
name = name.replace(/[[\]()]/g, '');
|
|
804
796
|
return prefix + name;
|
|
805
797
|
}
|
|
798
|
+
function getSimplifiedDOMNodeName(node) {
|
|
799
|
+
if (isDetachedDOMNode(node) || isDOMNodeIncomplete(node)) {
|
|
800
|
+
return simplifyTagAttributes(node.name);
|
|
801
|
+
}
|
|
802
|
+
return node.name;
|
|
803
|
+
}
|
|
804
|
+
function limitStringLength(str, len) {
|
|
805
|
+
if (str.length > len) {
|
|
806
|
+
return str.substring(0, len) + '...';
|
|
807
|
+
}
|
|
808
|
+
return str;
|
|
809
|
+
}
|
|
810
|
+
function simplifyTagAttributes(str, prioritizedAttributes = Config_1.default.defaultPrioritizedHTMLTagAttributes) {
|
|
811
|
+
const outputLengthLimit = 100;
|
|
812
|
+
const prefixEnd = str.indexOf('<');
|
|
813
|
+
if (prefixEnd <= 0) {
|
|
814
|
+
return str;
|
|
815
|
+
}
|
|
816
|
+
try {
|
|
817
|
+
const prefix = str.substring(0, prefixEnd);
|
|
818
|
+
const tagStr = str.substring(prefixEnd).trim();
|
|
819
|
+
const parsedTag = parseHTMLTags(tagStr)[0];
|
|
820
|
+
if (parsedTag == null) {
|
|
821
|
+
return limitStringLength(str, outputLengthLimit);
|
|
822
|
+
}
|
|
823
|
+
// Build maps for quick lookup
|
|
824
|
+
const attrMap = new Map(parsedTag.attributes.map(attr => [attr.key, attr]));
|
|
825
|
+
const prioritized = [];
|
|
826
|
+
for (const key of prioritizedAttributes) {
|
|
827
|
+
const attr = attrMap.get(key);
|
|
828
|
+
if (attr != null) {
|
|
829
|
+
prioritized.push(attr);
|
|
830
|
+
attrMap.delete(key);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
const remaining = parsedTag.attributes.filter(attr => attrMap.has(attr.key));
|
|
834
|
+
parsedTag.attributes = [...prioritized, ...remaining];
|
|
835
|
+
const finalStr = prefix + serializeParsedTags([parsedTag]);
|
|
836
|
+
return limitStringLength(finalStr, outputLengthLimit);
|
|
837
|
+
}
|
|
838
|
+
catch (_a) {
|
|
839
|
+
return limitStringLength(str, outputLengthLimit);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function parseHTMLTags(html) {
|
|
843
|
+
const result = [];
|
|
844
|
+
let i = 0;
|
|
845
|
+
while (i < html.length) {
|
|
846
|
+
if (html[i] === '<') {
|
|
847
|
+
i++; // skip '<'
|
|
848
|
+
// Determine if this is a closing tag
|
|
849
|
+
let isClosing = false;
|
|
850
|
+
if (html[i] === '/') {
|
|
851
|
+
isClosing = true;
|
|
852
|
+
i++;
|
|
853
|
+
}
|
|
854
|
+
// Extract tag name
|
|
855
|
+
let tagName = '';
|
|
856
|
+
while (i < html.length && /[a-zA-Z0-9:-]/.test(html[i])) {
|
|
857
|
+
tagName += html[i++];
|
|
858
|
+
}
|
|
859
|
+
// Skip whitespace
|
|
860
|
+
while (i < html.length && /\s/.test(html[i]))
|
|
861
|
+
i++;
|
|
862
|
+
// Parse attributes
|
|
863
|
+
const attributes = [];
|
|
864
|
+
while (i < html.length && html[i] !== '>' && html[i] !== '/') {
|
|
865
|
+
// Extract key
|
|
866
|
+
let key = '';
|
|
867
|
+
while (i < html.length && /[^\s=>]/.test(html[i])) {
|
|
868
|
+
key += html[i++];
|
|
869
|
+
}
|
|
870
|
+
// Skip whitespace
|
|
871
|
+
while (i < html.length && /\s/.test(html[i]))
|
|
872
|
+
i++;
|
|
873
|
+
// Extract value
|
|
874
|
+
let value = true;
|
|
875
|
+
if (html[i] === '=') {
|
|
876
|
+
i++; // skip '='
|
|
877
|
+
while (i < html.length && /\s/.test(html[i]))
|
|
878
|
+
i++;
|
|
879
|
+
if (html[i] === '"' || html[i] === "'") {
|
|
880
|
+
const quote = html[i++];
|
|
881
|
+
value = '';
|
|
882
|
+
while (i < html.length && html[i] !== quote) {
|
|
883
|
+
value += html[i++];
|
|
884
|
+
}
|
|
885
|
+
i++; // skip closing quote
|
|
886
|
+
}
|
|
887
|
+
else {
|
|
888
|
+
value = '';
|
|
889
|
+
while (i < html.length && /[^\s>]/.test(html[i])) {
|
|
890
|
+
value += html[i++];
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
if (key) {
|
|
895
|
+
attributes.push({ key, value });
|
|
896
|
+
}
|
|
897
|
+
// Skip whitespace
|
|
898
|
+
while (i < html.length && /\s/.test(html[i]))
|
|
899
|
+
i++;
|
|
900
|
+
}
|
|
901
|
+
// Check for self-closing
|
|
902
|
+
let isSelfClosing = false;
|
|
903
|
+
if (html[i] === '/') {
|
|
904
|
+
isSelfClosing = true;
|
|
905
|
+
i++; // skip '/'
|
|
906
|
+
}
|
|
907
|
+
// Skip '>'
|
|
908
|
+
if (html[i] === '>')
|
|
909
|
+
i++;
|
|
910
|
+
const type = isClosing
|
|
911
|
+
? 'closing'
|
|
912
|
+
: isSelfClosing
|
|
913
|
+
? 'self-closing'
|
|
914
|
+
: 'opening';
|
|
915
|
+
result.push({ tagName, attributes, type });
|
|
916
|
+
}
|
|
917
|
+
else {
|
|
918
|
+
i++;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
return result;
|
|
922
|
+
}
|
|
923
|
+
function serializeParsedTags(tags) {
|
|
924
|
+
return tags
|
|
925
|
+
.map(tag => {
|
|
926
|
+
if (tag.type === 'closing') {
|
|
927
|
+
return `</${tag.tagName}>`;
|
|
928
|
+
}
|
|
929
|
+
const attrString = tag.attributes
|
|
930
|
+
.map(({ key, value }) => {
|
|
931
|
+
if (value === true)
|
|
932
|
+
return key;
|
|
933
|
+
const escaped = String(value).replace(/"/g, '"');
|
|
934
|
+
return `${key}="${escaped}"`;
|
|
935
|
+
})
|
|
936
|
+
.join(' ');
|
|
937
|
+
const space = attrString ? ' ' : '';
|
|
938
|
+
return tag.type === 'self-closing'
|
|
939
|
+
? `<${tag.tagName}${space}${attrString}/>`
|
|
940
|
+
: `<${tag.tagName}${space}${attrString}>`;
|
|
941
|
+
})
|
|
942
|
+
.join('');
|
|
943
|
+
}
|
|
944
|
+
// remove all attributes from the tag name
|
|
945
|
+
// so Detached <div prop1="xyz" prop2="xyz" ...>
|
|
946
|
+
// becomes Detached <div>
|
|
947
|
+
function stripTagAttributes(str) {
|
|
948
|
+
let result = '';
|
|
949
|
+
let i = 0;
|
|
950
|
+
while (i < str.length) {
|
|
951
|
+
const open = str.indexOf('<', i);
|
|
952
|
+
if (open === -1) {
|
|
953
|
+
result += str.slice(i);
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
const close = str.indexOf('>', open);
|
|
957
|
+
if (close === -1) {
|
|
958
|
+
result += str.slice(i);
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
// Find the tag name
|
|
962
|
+
const space = str.indexOf(' ', open);
|
|
963
|
+
if (space !== -1 && space < close) {
|
|
964
|
+
const tagName = str.slice(open + 1, space);
|
|
965
|
+
result += str.slice(i, open) + `<${tagName}>`;
|
|
966
|
+
}
|
|
967
|
+
else {
|
|
968
|
+
result += str.slice(i, close + 1);
|
|
969
|
+
}
|
|
970
|
+
i = close + 1;
|
|
971
|
+
}
|
|
972
|
+
return result;
|
|
973
|
+
}
|
|
806
974
|
function getNumberNodeValue(node) {
|
|
807
975
|
if (!node) {
|
|
808
976
|
return null;
|
|
@@ -1169,8 +1337,8 @@ function checkUninstalledLibrary(ex) {
|
|
|
1169
1337
|
});
|
|
1170
1338
|
}
|
|
1171
1339
|
}
|
|
1172
|
-
function closePuppeteer(
|
|
1173
|
-
return __awaiter(this,
|
|
1340
|
+
function closePuppeteer(browser, pages, options = {}) {
|
|
1341
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1174
1342
|
if (Config_1.default.isLocalPuppeteer && !options.warmup) {
|
|
1175
1343
|
yield Promise.all(pages.map(page => page.close()));
|
|
1176
1344
|
yield browser.disconnect();
|
|
@@ -1326,6 +1494,7 @@ function resolveSnapshotFilePath(snapshotFile) {
|
|
|
1326
1494
|
}
|
|
1327
1495
|
return file;
|
|
1328
1496
|
}
|
|
1497
|
+
exports.resolveSnapshotFilePath = resolveSnapshotFilePath;
|
|
1329
1498
|
function getSnapshotDirForAnalysis() {
|
|
1330
1499
|
const dir = Config_1.default.externalSnapshotDir;
|
|
1331
1500
|
if (!dir) {
|
|
@@ -1652,7 +1821,7 @@ function haltOrThrow(errorInfo, options = {}) {
|
|
|
1652
1821
|
var _a;
|
|
1653
1822
|
const err = getError(errorInfo);
|
|
1654
1823
|
const halt = () => __awaiter(this, void 0, void 0, function* () {
|
|
1655
|
-
var
|
|
1824
|
+
var _b;
|
|
1656
1825
|
if (options.printErrorBeforeHalting !== false) {
|
|
1657
1826
|
// only print the error.message when there is no
|
|
1658
1827
|
// primary message to print or there is no print callback
|
|
@@ -1661,7 +1830,7 @@ function haltOrThrow(errorInfo, options = {}) {
|
|
|
1661
1830
|
}
|
|
1662
1831
|
// only print stack trace in verbose mode
|
|
1663
1832
|
if (Config_1.default.verbose) {
|
|
1664
|
-
Console_1.default.lowLevel((
|
|
1833
|
+
Console_1.default.lowLevel((_b = err.stack) !== null && _b !== void 0 ? _b : '', {
|
|
1665
1834
|
annotation: Console_1.default.annotations.STACK_TRACE,
|
|
1666
1835
|
});
|
|
1667
1836
|
}
|
|
@@ -1678,7 +1847,7 @@ function haltOrThrow(errorInfo, options = {}) {
|
|
|
1678
1847
|
options.printCallback();
|
|
1679
1848
|
}
|
|
1680
1849
|
}
|
|
1681
|
-
|
|
1850
|
+
process_1.default.exit(1);
|
|
1682
1851
|
});
|
|
1683
1852
|
const throwErr = () => {
|
|
1684
1853
|
let message = '';
|
|
@@ -1812,6 +1981,7 @@ function runShell(command, options = {}) {
|
|
|
1812
1981
|
}
|
|
1813
1982
|
return ret && ret.toString('UTF-8');
|
|
1814
1983
|
}
|
|
1984
|
+
exports.runShell = runShell;
|
|
1815
1985
|
function getRetainedSize(node) {
|
|
1816
1986
|
return node.retainedSize;
|
|
1817
1987
|
}
|
|
@@ -1932,6 +2102,7 @@ exports.default = {
|
|
|
1932
2102
|
getReadableTime,
|
|
1933
2103
|
getRetainedSize,
|
|
1934
2104
|
getScenarioName,
|
|
2105
|
+
getSimplifiedDOMNodeName,
|
|
1935
2106
|
getSingleSnapshotFileForAnalysis,
|
|
1936
2107
|
getSnapshotDirForAnalysis,
|
|
1937
2108
|
getSnapshotFilePath,
|
|
@@ -2012,6 +2183,8 @@ exports.default = {
|
|
|
2012
2183
|
setIsRegularFiberNode,
|
|
2013
2184
|
shouldShowMoreInfo,
|
|
2014
2185
|
shuffleArray,
|
|
2186
|
+
simplifyTagAttributes,
|
|
2187
|
+
stripTagAttributes,
|
|
2015
2188
|
throwError,
|
|
2016
2189
|
tryToMutePuppeteerWarning,
|
|
2017
2190
|
upperCaseFirstCharacter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeapEdge.d.ts","sourceRoot":"","sources":["../../../src/lib/heap-data/HeapEdge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"HeapEdge.d.ts","sourceRoot":"","sources":["../../../src/lib/heap-data/HeapEdge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,SAAS;IAE9C,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,GAAG;gBADH,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM;IAGrB,IAAI,QAAQ,IAAI,YAAY,CAE3B;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,IAAI,IAAI,MAAM,CAQjB;IAKD,IAAI,QAAQ,IAAI,OAAO,CAGtB;IAED,IAAI,aAAa,IAAI,MAAM,GAAG,MAAM,CAYnC;IAED,IAAI,OAAO,IAAI,MAAM,CAWpB;IAED,IAAI,MAAM,IAAI,QAAQ,CAErB;IAED,IAAI,QAAQ,IAAI,QAAQ,CAKvB;IAED,oBAAoB,IAAI,SAAS;IAUjC,YAAY,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM;CAI/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeapLocation.d.ts","sourceRoot":"","sources":["../../../src/lib/heap-data/HeapLocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"HeapLocation.d.ts","sourceRoot":"","sources":["../../../src/lib/heap-data/HeapLocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,aAAa;IAEtD,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,GAAG;gBADH,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,MAAM;IAGrB,IAAI,QAAQ,IAAI,YAAY,CAE3B;IAED,IAAI,IAAI,IAAI,QAAQ,CAAC,SAAS,CAAC,CAS9B;IAED,IAAI,SAAS,IAAI,MAAM,CAOtB;IAED,IAAI,IAAI,IAAI,MAAM,CAOjB;IAED,IAAI,MAAM,IAAI,MAAM,CAOnB;IAED,oBAAoB,IAAI,SAAS;IAYjC,YAAY,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM;CAI/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeapNode.d.ts","sourceRoot":"","sources":["../../../src/lib/heap-data/HeapNode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,SAAS,EACT,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,MAAM,CAAC,OA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AC,EAAE,MAAM,GAChB,QAAQ,CAAC,SAAS,CAAC;IAgBtB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE;IAavE,kBAAkB,CAChB,QAAQ,EAAE,MAAM,GAAG,MAAM,EACzB,QAAQ,CAAC,EAAE,MAAM,GAChB,QAAQ,CAAC,SAAS,CAAC;IAMtB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE;IAqB3E,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,YAAY,IAAI,QAAQ,CAAC,eAAe,CAAC;IAMzC,oBAAoB,IAAI,SAAS;IAcjC,YAAY,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,MAAM;CAI/C"}
|
|
@@ -13,13 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.isHeapStringType =
|
|
16
|
+
exports.isHeapStringType = void 0;
|
|
17
17
|
const HeapUtils_1 = require("./HeapUtils");
|
|
18
18
|
const HeapEdge_1 = __importDefault(require("./HeapEdge"));
|
|
19
19
|
const HeapLocation_1 = __importDefault(require("./HeapLocation"));
|
|
20
20
|
function isHeapStringType(type) {
|
|
21
21
|
return ['string', 'sliced string', 'concatenated string'].includes(type);
|
|
22
22
|
}
|
|
23
|
+
exports.isHeapStringType = isHeapStringType;
|
|
23
24
|
class HeapNode {
|
|
24
25
|
constructor(heapSnapshot, idx) {
|
|
25
26
|
this.heapSnapshot = heapSnapshot;
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
'use strict';
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.NodeDetachState = void 0;
|
|
14
|
-
exports.throwError = throwError;
|
|
13
|
+
exports.throwError = exports.NodeDetachState = void 0;
|
|
15
14
|
exports.NodeDetachState = {
|
|
16
15
|
Unknown: 0,
|
|
17
16
|
Attached: 1,
|
|
@@ -23,3 +22,4 @@ function throwError(error) {
|
|
|
23
22
|
}
|
|
24
23
|
throw error;
|
|
25
24
|
}
|
|
25
|
+
exports.throwError = throwError;
|
|
@@ -19,7 +19,7 @@ var LeakDecision;
|
|
|
19
19
|
LeakDecision["LEAK"] = "leak";
|
|
20
20
|
LeakDecision["MAYBE_LEAK"] = "maybe-leak";
|
|
21
21
|
LeakDecision["NOT_LEAK"] = "not-leak";
|
|
22
|
-
})(LeakDecision
|
|
22
|
+
})(LeakDecision = exports.LeakDecision || (exports.LeakDecision = {}));
|
|
23
23
|
class LeakObjectFilterRuleBase {
|
|
24
24
|
beforeFiltering(
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -19,4 +19,4 @@ var TraceDecision;
|
|
|
19
19
|
TraceDecision["INSIGHTFUL"] = "insightful";
|
|
20
20
|
TraceDecision["MAYBE_INSIGHTFUL"] = "maybe-insightful";
|
|
21
21
|
TraceDecision["NOT_INSIGHTFUL"] = "not-insightful";
|
|
22
|
-
})(TraceDecision
|
|
22
|
+
})(TraceDecision = exports.TraceDecision || (exports.TraceDecision = {}));
|
|
@@ -60,8 +60,8 @@ class LeakClusterLogger {
|
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
dumpReadableCluster() {
|
|
64
|
-
return __awaiter(this,
|
|
63
|
+
dumpReadableCluster(options = {}) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const metaFile = options.metaFile;
|
|
66
66
|
if (!metaFile || !fs_1.default.existsSync(metaFile)) {
|
|
67
67
|
throw Utils_1.default.haltOrThrow(`File doesn't exist: ${metaFile}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TraceFinder.d.ts","sourceRoot":"","sources":["../../src/paths/TraceFinder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,SAAS,EAET,SAAS,EAET,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,cAAc,CAAC;AActB,cAAM,WAAW;IACf,eAAe,CACb,QAAQ,EAAE,aAAa,EACvB,GAAG,GAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAM,GAC/B,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC;IA0B7B,wBAAwB,CACtB,QAAQ,EAAE,aAAa,EACvB,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAC7C,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,GAC5C,IAAI;IA6CP,4BAA4B,CAC1B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,GACX,IAAI;IA6CP,OAAO,CAAC,mBAAmB;IAuJ3B,OAAO,CAAC,oCAAoC;
|
|
1
|
+
{"version":3,"file":"TraceFinder.d.ts","sourceRoot":"","sources":["../../src/paths/TraceFinder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,SAAS,EAET,SAAS,EAET,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACX,MAAM,cAAc,CAAC;AActB,cAAM,WAAW;IACf,eAAe,CACb,QAAQ,EAAE,aAAa,EACvB,GAAG,GAAE;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAM,GAC/B,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC;IA0B7B,wBAAwB,CACtB,QAAQ,EAAE,aAAa,EACvB,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,EAC7C,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,GAC5C,IAAI;IA6CP,4BAA4B,CAC1B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,GACX,IAAI;IA6CP,OAAO,CAAC,mBAAmB;IAuJ3B,OAAO,CAAC,oCAAoC;IA2J5C,OAAO,CAAC,wCAAwC;IA4BhD,8BAA8B,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAqBxD,kBAAkB,CAChB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,aAAa,EACvB,OAAO,GAAE,UAAe,GACvB,OAAO;IAYV,OAAO,CAAC,oCAAoC;IAW5C,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAsB3C,oBAAoB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IA6B9C,oBAAoB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAK9C,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM;IAMnC,8BAA8B,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAiC7D,qBAAqB,CACnB,QAAQ,EAAE,aAAa,EACvB,aAAa,CAAC,EAAE,aAAa,GAC5B,IAAI;IA6EP,gBAAgB,CACd,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,GACxB,QAAQ,CAAC,iBAAiB,CAAC;CAkB/B;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -50,7 +50,7 @@ class TraceFinder {
|
|
|
50
50
|
const traverseOption = {
|
|
51
51
|
visited: visitedIDs,
|
|
52
52
|
queued: queuedIDs,
|
|
53
|
-
excludeWeakMapEdge: false,
|
|
53
|
+
excludeWeakMapEdge: false,
|
|
54
54
|
isForward: true,
|
|
55
55
|
};
|
|
56
56
|
while (queue.length > 0) {
|
|
@@ -283,7 +283,8 @@ class TraceFinder {
|
|
|
283
283
|
}
|
|
284
284
|
const childNodeIndex = forwardEdges.get(edgeIndex).toNode
|
|
285
285
|
.nodeIndex;
|
|
286
|
-
nodesWithOutdatedDominatorInfo[nodeIndex2PostOrderIndex[childNodeIndex]] =
|
|
286
|
+
nodesWithOutdatedDominatorInfo[nodeIndex2PostOrderIndex[childNodeIndex]] =
|
|
287
|
+
1;
|
|
287
288
|
}
|
|
288
289
|
// now iterate through all nodes in the heap
|
|
289
290
|
let dominatorInfoChanged = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterUtils.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/ClusterUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;;;;AAI5C,wBAA6D;AAE7D;;;;GAIG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"ClusterUtils.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/ClusterUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;;;;AAI5C,wBAA6D;AAE7D;;;;GAIG;AACH,eAAO,MAAM,YAAY,qBAAsB,MAAM,UAepD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,qBAAsB,MAAM,UAU9C,CAAC;AAEF,eAAe;AACf,eAAO,MAAM,iBAAiB,+DAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusterUtilsHelper.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/ClusterUtilsHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,KAAK,EAAC,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AASxE,KAAK,iBAAiB,GAAG,GAAG,CA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AA;KAAC,EAAE,CAAC;IACrE,8BAA8B,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACrD;AAED,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAQlD;AAED,UAAU,iCAAiC;IACzC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gCAAgC,kDAK1C,iCAAiC,KAAG,IAatC,CAAC;AAMF,KAAK,wBAAwB,GAAG;IAC9B,cAAc,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,KAAK,OAAO,CAAC;CAC3D,CAAC;;;;AAqcF,wBAEE"}
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* @oncall memory_lab
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.debugTraceElementSimilarityStats = void 0;
|
|
13
|
-
exports.debugLog = debugLog;
|
|
12
|
+
exports.debugTraceElementSimilarityStats = exports.debugLog = void 0;
|
|
14
13
|
function NON_NULLABLE(v) {
|
|
15
14
|
if (v == null) {
|
|
16
15
|
throw new Error('value must not be null or undefined');
|
|
@@ -29,6 +28,7 @@ function debugLog(...args) {
|
|
|
29
28
|
}
|
|
30
29
|
console.log(args.join(' |\t'));
|
|
31
30
|
}
|
|
31
|
+
exports.debugLog = debugLog;
|
|
32
32
|
const debugTraceElementSimilarityStats = ({ elementA, elementB, matchedSum, totalSum, }) => {
|
|
33
33
|
const similarityScoreString = `${matchedSum} / ${totalSum}`;
|
|
34
34
|
if (elementA.kind === 'edge') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClusteringHeuristics.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/ClusteringHeuristics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG
|
|
1
|
+
{"version":3,"file":"ClusteringHeuristics.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/ClusteringHeuristics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;;;;cAUqC,MAAM;cAAQ,MAAM;eAAS,MAAM;;;;AAL3E,wBAUE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EvalutationMetric.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/EvalutationMetric.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqHH,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"EvalutationMetric.d.ts","sourceRoot":"","sources":["../../src/trace-cluster/EvalutationMetric.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqHH,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;;;;;;;;;AA+ElD,wBAME"}
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* @format
|
|
8
8
|
* @oncall memory_lab
|
|
9
9
|
*/
|
|
10
|
-
export declare const distance: (tfidfs: Record<string, number>[]) => Float32Array
|
|
10
|
+
export declare const distance: (tfidfs: Record<string, number>[]) => Float32Array;
|
|
11
11
|
//# sourceMappingURL=DistanceMatrix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DistanceMatrix.d.ts","sourceRoot":"","sources":["../../../../src/trace-cluster/strategies/machine-learning/DistanceMatrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2BH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"DistanceMatrix.d.ts","sourceRoot":"","sources":["../../../../src/trace-cluster/strategies/machine-learning/DistanceMatrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2BH,eAAO,MAAM,QAAQ,WAAY,OAAO,MAAM,EAAE,MAAM,CAAC,EAAE,iBA6BxD,CAAC"}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* @param {*} D condenced distance matrix
|
|
14
14
|
* @returns labels - list of doc ids as clusters
|
|
15
15
|
*/
|
|
16
|
-
export declare const cluster: (nDocs: number, condensedDistanceMatrix: Float32Array, maxDistanceThreshold: number) => number[] | Uint32Array
|
|
16
|
+
export declare const cluster: (nDocs: number, condensedDistanceMatrix: Float32Array, maxDistanceThreshold: number) => number[] | Uint32Array;
|
|
17
17
|
//# sourceMappingURL=HAC.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HAC.d.ts","sourceRoot":"","sources":["../../../../src/trace-cluster/strategies/machine-learning/HAC.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"HAC.d.ts","sourceRoot":"","sources":["../../../../src/trace-cluster/strategies/machine-learning/HAC.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,UACX,MAAM,2BACY,YAAY,wBACf,MAAM,2BA4G7B,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @oncall memory_lab
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.nGram =
|
|
12
|
+
exports.nGram = void 0;
|
|
13
13
|
function nGram(n, terms) {
|
|
14
14
|
const nGrams = [];
|
|
15
15
|
let index = 0;
|
|
@@ -19,3 +19,4 @@ function nGram(n, terms) {
|
|
|
19
19
|
}
|
|
20
20
|
return nGrams;
|
|
21
21
|
}
|
|
22
|
+
exports.nGram = nGram;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/utils/utils.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
File without changes
|