traceperf 0.1.5 → 0.2.0
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/README.md +227 -223
- package/dist/browser.d.ts +52 -7
- package/dist/browser.js +198 -35
- package/dist/browser.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/optimized-performance-monitor.d.ts +227 -0
- package/dist/core/optimized-performance-monitor.js +543 -0
- package/dist/core/optimized-performance-monitor.js.map +1 -0
- package/dist/esm/browser.d.ts +52 -7
- package/dist/esm/browser.js +196 -34
- package/dist/esm/browser.js.map +1 -1
- package/dist/esm/core/index.d.ts +1 -0
- package/dist/esm/core/index.js +1 -0
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/optimized-performance-monitor.d.ts +227 -0
- package/dist/esm/core/optimized-performance-monitor.js +535 -0
- package/dist/esm/core/optimized-performance-monitor.js.map +1 -0
- package/dist/esm/index.d.ts +7 -8
- package/dist/esm/index.js +18 -19
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/trackers/execution.d.ts +34 -26
- package/dist/esm/trackers/execution.js +99 -60
- package/dist/esm/trackers/execution.js.map +1 -1
- package/dist/esm/trackers/performance.d.ts +7 -21
- package/dist/esm/trackers/performance.js +25 -19
- package/dist/esm/trackers/performance.js.map +1 -1
- package/dist/esm/types/config.d.ts +16 -2
- package/dist/esm/types/index.d.ts +32 -34
- package/dist/esm/types/logger.d.ts +11 -2
- package/dist/esm/utils/colors.js +12 -0
- package/dist/esm/utils/colors.js.map +1 -1
- package/dist/esm/utils/string.d.ts +29 -0
- package/dist/esm/utils/string.js +45 -0
- package/dist/esm/utils/string.js.map +1 -0
- package/dist/index.d.ts +7 -8
- package/dist/index.js +42 -20
- package/dist/index.js.map +1 -1
- package/dist/trackers/execution.d.ts +34 -26
- package/dist/trackers/execution.js +98 -59
- package/dist/trackers/execution.js.map +1 -1
- package/dist/trackers/performance.d.ts +7 -21
- package/dist/trackers/performance.js +25 -19
- package/dist/trackers/performance.js.map +1 -1
- package/dist/types/config.d.ts +16 -2
- package/dist/types/index.d.ts +32 -34
- package/dist/types/logger.d.ts +11 -2
- package/dist/types.d.ts +65 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/colors.js +12 -0
- package/dist/utils/colors.js.map +1 -1
- package/dist/utils/string.d.ts +29 -0
- package/dist/utils/string.js +50 -0
- package/dist/utils/string.js.map +1 -0
- package/package.json +11 -8
package/dist/esm/utils/colors.js
CHANGED
|
@@ -10,6 +10,9 @@ import { COLORS } from '../core/constants';
|
|
|
10
10
|
* @returns The colorized string
|
|
11
11
|
*/
|
|
12
12
|
export function colorize(text, color) {
|
|
13
|
+
if (typeof supportsColor === 'function' ? !supportsColor() : false) {
|
|
14
|
+
return text;
|
|
15
|
+
}
|
|
13
16
|
return `${color}${text}${COLORS.reset}`;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
@@ -19,6 +22,9 @@ export function colorize(text, color) {
|
|
|
19
22
|
* @returns The bold string
|
|
20
23
|
*/
|
|
21
24
|
export function bold(text) {
|
|
25
|
+
if (typeof supportsColor === 'function' ? !supportsColor() : false) {
|
|
26
|
+
return text;
|
|
27
|
+
}
|
|
22
28
|
return `${COLORS.bright}${text}${COLORS.reset}`;
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
@@ -28,6 +34,9 @@ export function bold(text) {
|
|
|
28
34
|
* @returns The dim string
|
|
29
35
|
*/
|
|
30
36
|
export function dim(text) {
|
|
37
|
+
if (typeof supportsColor === 'function' ? !supportsColor() : false) {
|
|
38
|
+
return text;
|
|
39
|
+
}
|
|
31
40
|
return `${COLORS.dim}${text}${COLORS.reset}`;
|
|
32
41
|
}
|
|
33
42
|
/**
|
|
@@ -37,6 +46,9 @@ export function dim(text) {
|
|
|
37
46
|
* @returns The underlined string
|
|
38
47
|
*/
|
|
39
48
|
export function underline(text) {
|
|
49
|
+
if (typeof supportsColor === 'function' ? !supportsColor() : false) {
|
|
50
|
+
return text;
|
|
51
|
+
}
|
|
40
52
|
return `${COLORS.underscore}${text}${COLORS.reset}`;
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,OAAO,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY;IAC9B,OAAO,GAAG,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,GAAG,MAAM,CAAC,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY;IAC9B,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,IAAY;IAChC,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,I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AED;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String utility functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Center a string with padding
|
|
6
|
+
*
|
|
7
|
+
* @param str - The string to center
|
|
8
|
+
* @param length - The total length of the returned string
|
|
9
|
+
* @param char - The character to use for padding (default: space)
|
|
10
|
+
* @returns The padded string
|
|
11
|
+
*/
|
|
12
|
+
export declare function padCenter(str: string, length: number, char?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Truncate a string to a specified length and add ellipsis if needed
|
|
15
|
+
*
|
|
16
|
+
* @param str - The string to truncate
|
|
17
|
+
* @param maxLength - The maximum length allowed
|
|
18
|
+
* @returns The truncated string
|
|
19
|
+
*/
|
|
20
|
+
export declare function truncate(str: string, maxLength: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Ensure that the string is at least a certain length
|
|
23
|
+
*
|
|
24
|
+
* @param str - The string to pad
|
|
25
|
+
* @param length - The minimum length desired
|
|
26
|
+
* @param char - The character to use for padding (default: space)
|
|
27
|
+
* @returns The padded string
|
|
28
|
+
*/
|
|
29
|
+
export declare function padEnd(str: string, length: number, char?: string): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String utility functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Center a string with padding
|
|
6
|
+
*
|
|
7
|
+
* @param str - The string to center
|
|
8
|
+
* @param length - The total length of the returned string
|
|
9
|
+
* @param char - The character to use for padding (default: space)
|
|
10
|
+
* @returns The padded string
|
|
11
|
+
*/
|
|
12
|
+
export function padCenter(str, length, char = ' ') {
|
|
13
|
+
if (str.length >= length)
|
|
14
|
+
return str;
|
|
15
|
+
const leftPadding = Math.floor((length - str.length) / 2);
|
|
16
|
+
const rightPadding = length - str.length - leftPadding;
|
|
17
|
+
return char.repeat(leftPadding) + str + char.repeat(rightPadding);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Truncate a string to a specified length and add ellipsis if needed
|
|
21
|
+
*
|
|
22
|
+
* @param str - The string to truncate
|
|
23
|
+
* @param maxLength - The maximum length allowed
|
|
24
|
+
* @returns The truncated string
|
|
25
|
+
*/
|
|
26
|
+
export function truncate(str, maxLength) {
|
|
27
|
+
if (str.length <= maxLength)
|
|
28
|
+
return str;
|
|
29
|
+
const ellipsis = '...';
|
|
30
|
+
return str.substring(0, maxLength - ellipsis.length) + ellipsis;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Ensure that the string is at least a certain length
|
|
34
|
+
*
|
|
35
|
+
* @param str - The string to pad
|
|
36
|
+
* @param length - The minimum length desired
|
|
37
|
+
* @param char - The character to use for padding (default: space)
|
|
38
|
+
* @returns The padded string
|
|
39
|
+
*/
|
|
40
|
+
export function padEnd(str, length, char = ' ') {
|
|
41
|
+
if (str.length >= length)
|
|
42
|
+
return str;
|
|
43
|
+
return str + char.repeat(length - str.length);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=string.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,MAAc,EAAE,OAAe,GAAG;IACvE,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IAErC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,WAAW,CAAC;IAEvD,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,SAAiB;IACrD,IAAI,GAAG,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,GAAG,CAAC;IAExC,MAAM,QAAQ,GAAG,KAAK,CAAC;IACvB,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;AAClE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW,EAAE,MAAc,EAAE,OAAe,GAAG;IACpE,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IAErC,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
5
|
-
export declare function
|
|
1
|
+
import { OptimizedPerformanceMonitor, TrackingModes } from './core/optimized-performance-monitor';
|
|
2
|
+
import { ITracePerfConfig } from './types';
|
|
3
|
+
declare const tracePerf: OptimizedPerformanceMonitor;
|
|
4
|
+
export default tracePerf;
|
|
5
|
+
export declare function createTracePerf(config?: Partial<ITracePerfConfig>): OptimizedPerformanceMonitor;
|
|
6
6
|
export * from './types';
|
|
7
7
|
export * from './core';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export * from './utils';
|
|
8
|
+
export { OptimizedPerformanceMonitor };
|
|
9
|
+
export { TrackingModes as TrackingMode };
|
package/dist/index.js
CHANGED
|
@@ -10,37 +10,59 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
13
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
37
|
};
|
|
16
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
const
|
|
39
|
+
exports.TrackingMode = exports.OptimizedPerformanceMonitor = void 0;
|
|
40
|
+
exports.createTracePerf = createTracePerf;
|
|
41
|
+
// Import optimized performance monitor from core
|
|
42
|
+
const optimized_performance_monitor_1 = require("./core/optimized-performance-monitor");
|
|
43
|
+
Object.defineProperty(exports, "OptimizedPerformanceMonitor", { enumerable: true, get: function () { return optimized_performance_monitor_1.OptimizedPerformanceMonitor; } });
|
|
44
|
+
Object.defineProperty(exports, "TrackingMode", { enumerable: true, get: function () { return optimized_performance_monitor_1.TrackingModes; } });
|
|
45
|
+
const typesExports = __importStar(require("./types"));
|
|
46
|
+
// Create singleton instance
|
|
47
|
+
const tracePerf = new optimized_performance_monitor_1.OptimizedPerformanceMonitor();
|
|
21
48
|
// Export the singleton instance as the default export
|
|
22
|
-
exports.default =
|
|
23
|
-
// Export a function to create a new
|
|
24
|
-
function
|
|
25
|
-
return new
|
|
49
|
+
exports.default = tracePerf;
|
|
50
|
+
// Export a function to create a new tracePerf instance
|
|
51
|
+
function createTracePerf(config = {}) {
|
|
52
|
+
return new optimized_performance_monitor_1.OptimizedPerformanceMonitor(config);
|
|
26
53
|
}
|
|
27
54
|
// Export types and classes for advanced usage
|
|
28
55
|
__exportStar(require("./types"), exports);
|
|
29
56
|
__exportStar(require("./core"), exports);
|
|
30
|
-
__exportStar(require("./formatters"), exports);
|
|
31
|
-
__exportStar(require("./trackers"), exports);
|
|
32
|
-
__exportStar(require("./utils"), exports);
|
|
33
57
|
// Add CommonJS compatibility
|
|
34
58
|
if (typeof module !== 'undefined' && module.exports) {
|
|
35
|
-
module.exports = Object.assign(
|
|
36
|
-
default:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...
|
|
42
|
-
...require('./trackers'),
|
|
43
|
-
...require('./utils')
|
|
59
|
+
module.exports = Object.assign(tracePerf, {
|
|
60
|
+
default: tracePerf,
|
|
61
|
+
createTracePerf,
|
|
62
|
+
OptimizedPerformanceMonitor: optimized_performance_monitor_1.OptimizedPerformanceMonitor,
|
|
63
|
+
TrackingMode: optimized_performance_monitor_1.TrackingModes,
|
|
64
|
+
// Re-export types
|
|
65
|
+
...typesExports
|
|
44
66
|
});
|
|
45
67
|
}
|
|
46
68
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,0CAEC;AAdD,iDAAiD;AACjD,wFAAkG;AAkBzF,4GAlBA,2DAA2B,OAkBA;AACV,6FAnBY,6CAAa,OAmBb;AAjBtC,sDAAwC;AAExC,4BAA4B;AAC5B,MAAM,SAAS,GAAG,IAAI,2DAA2B,EAAE,CAAC;AAEpD,sDAAsD;AACtD,kBAAe,SAAS,CAAC;AAEzB,uDAAuD;AACvD,SAAgB,eAAe,CAAC,SAAoC,EAAE;IACpE,OAAO,IAAI,2DAA2B,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,8CAA8C;AAC9C,0CAAwB;AACxB,yCAAuB;AAIvB,6BAA6B;AAC7B,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;IACpD,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;QACxC,OAAO,EAAE,SAAS;QAClB,eAAe;QACf,2BAA2B,EAA3B,2DAA2B;QAC3B,YAAY,EAAE,6CAAa;QAC3B,kBAAkB;QAClB,GAAG,YAAY;KAChB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { IExecutionTracker, ITrackOptions } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A record of a function execution
|
|
4
4
|
*/
|
|
5
|
-
interface ExecutionRecord {
|
|
5
|
+
export interface ExecutionRecord {
|
|
6
6
|
name: string;
|
|
7
7
|
duration: number;
|
|
8
|
-
isSlow: boolean;
|
|
9
|
-
memoryUsage?: number;
|
|
10
|
-
level: number;
|
|
11
8
|
startTime: [number, number];
|
|
12
9
|
endTime?: [number, number];
|
|
10
|
+
isSlow: boolean;
|
|
11
|
+
level: number;
|
|
12
|
+
memoryUsage?: number;
|
|
13
|
+
memoryReleased?: number;
|
|
13
14
|
children: ExecutionRecord[];
|
|
14
15
|
parent?: ExecutionRecord;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
|
-
* Execution tracker for
|
|
18
|
+
* Execution tracker for performance monitoring
|
|
18
19
|
*/
|
|
19
20
|
export declare class ExecutionTracker implements IExecutionTracker {
|
|
20
|
-
private _callStack;
|
|
21
21
|
private _executions;
|
|
22
22
|
private _currentExecution;
|
|
23
|
-
private _asciiGenerator;
|
|
24
23
|
private _defaultThreshold;
|
|
24
|
+
private _callStack;
|
|
25
25
|
private _globalScope;
|
|
26
|
+
private _trackedFunctions;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* Constructor
|
|
28
29
|
*
|
|
29
|
-
* @param options -
|
|
30
|
+
* @param options - Options for execution tracking
|
|
30
31
|
*/
|
|
31
32
|
constructor(options?: {
|
|
32
33
|
defaultThreshold?: number;
|
|
33
|
-
boxWidth?: number;
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
36
|
* Track the execution of a function
|
|
@@ -53,6 +53,19 @@ export declare class ExecutionTracker implements IExecutionTracker {
|
|
|
53
53
|
createTrackable<T extends (...args: any[]) => any>(fn: T, options?: Omit<ITrackOptions, 'label'> & {
|
|
54
54
|
label?: string;
|
|
55
55
|
}): (...args: Parameters<T>) => ReturnType<T>;
|
|
56
|
+
/**
|
|
57
|
+
* Get all execution records
|
|
58
|
+
*
|
|
59
|
+
* @returns A list of execution records
|
|
60
|
+
*/
|
|
61
|
+
getExecutions(): ExecutionRecord[];
|
|
62
|
+
/**
|
|
63
|
+
* Generate a human-friendly memory size string
|
|
64
|
+
*
|
|
65
|
+
* @param bytes - The size in bytes
|
|
66
|
+
* @returns A formatted string
|
|
67
|
+
*/
|
|
68
|
+
formatMemorySize(bytes: number): string;
|
|
56
69
|
/**
|
|
57
70
|
* Get the current call stack
|
|
58
71
|
*
|
|
@@ -66,28 +79,23 @@ export declare class ExecutionTracker implements IExecutionTracker {
|
|
|
66
79
|
*/
|
|
67
80
|
generateFlowChart(): string;
|
|
68
81
|
/**
|
|
69
|
-
*
|
|
82
|
+
* Recursively print an execution tree
|
|
70
83
|
*
|
|
71
|
-
* @param
|
|
72
|
-
* @
|
|
84
|
+
* @param execution - The root execution
|
|
85
|
+
* @param result - The output string
|
|
86
|
+
* @returns The updated result string
|
|
73
87
|
*/
|
|
74
|
-
private
|
|
88
|
+
private printExecutionTree;
|
|
75
89
|
/**
|
|
76
|
-
*
|
|
90
|
+
* Print a single execution with appropriate formatting
|
|
77
91
|
*
|
|
78
|
-
* @param
|
|
79
|
-
* @param result - The result
|
|
92
|
+
* @param execution - The execution to print
|
|
93
|
+
* @param result - The result string to append to
|
|
94
|
+
* @returns The updated result string
|
|
80
95
|
*/
|
|
81
|
-
private
|
|
96
|
+
private printSingleExecution;
|
|
82
97
|
/**
|
|
83
98
|
* Clear all execution records
|
|
84
99
|
*/
|
|
85
100
|
clear(): void;
|
|
86
|
-
/**
|
|
87
|
-
* Get all execution records
|
|
88
|
-
*
|
|
89
|
-
* @returns All execution records
|
|
90
|
-
*/
|
|
91
|
-
getExecutions(): ExecutionRecord[];
|
|
92
101
|
}
|
|
93
|
-
export {};
|
|
@@ -3,22 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExecutionTracker = void 0;
|
|
4
4
|
const stack_1 = require("../utils/stack");
|
|
5
5
|
const timing_1 = require("../utils/timing");
|
|
6
|
-
const ascii_1 = require("../formatters/ascii");
|
|
7
6
|
/**
|
|
8
|
-
* Execution tracker for
|
|
7
|
+
* Execution tracker for performance monitoring
|
|
9
8
|
*/
|
|
10
9
|
class ExecutionTracker {
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Constructor
|
|
13
12
|
*
|
|
14
|
-
* @param options -
|
|
13
|
+
* @param options - Options for execution tracking
|
|
15
14
|
*/
|
|
16
15
|
constructor(options = {}) {
|
|
17
16
|
var _a;
|
|
18
17
|
this._executions = [];
|
|
19
18
|
this._currentExecution = null;
|
|
20
|
-
this._callStack =
|
|
21
|
-
this.
|
|
19
|
+
this._callStack = [];
|
|
20
|
+
this._trackedFunctions = new Map();
|
|
22
21
|
this._defaultThreshold = (_a = options.defaultThreshold) !== null && _a !== void 0 ? _a : 100; // ms
|
|
23
22
|
// Get a reference to the global scope (works in both Node.js and browsers)
|
|
24
23
|
this._globalScope = typeof window !== 'undefined' ? window :
|
|
@@ -36,10 +35,18 @@ class ExecutionTracker {
|
|
|
36
35
|
var _a, _b, _c;
|
|
37
36
|
const fnName = (options === null || options === void 0 ? void 0 : options.label) || (0, stack_1.getFunctionName)(fn);
|
|
38
37
|
const threshold = (_a = options === null || options === void 0 ? void 0 : options.threshold) !== null && _a !== void 0 ? _a : this._defaultThreshold;
|
|
39
|
-
const includeMemory = (_b = options === null || options === void 0 ? void 0 : options.
|
|
38
|
+
const includeMemory = (_b = options === null || options === void 0 ? void 0 : options.trackMemory) !== null && _b !== void 0 ? _b : true;
|
|
40
39
|
const enableNestedTracking = (_c = options === null || options === void 0 ? void 0 : options.enableNestedTracking) !== null && _c !== void 0 ? _c : true;
|
|
41
40
|
// Get memory usage before execution
|
|
42
|
-
|
|
41
|
+
let startMemory;
|
|
42
|
+
if (includeMemory) {
|
|
43
|
+
try {
|
|
44
|
+
startMemory = process.memoryUsage();
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
console.warn('Unable to track memory usage:', e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
43
50
|
// Start timing
|
|
44
51
|
const startTime = (0, timing_1.getHighResTime)();
|
|
45
52
|
// Add to call stack
|
|
@@ -80,7 +87,19 @@ class ExecutionTracker {
|
|
|
80
87
|
execution.isSlow = execution.duration > threshold;
|
|
81
88
|
// Calculate memory usage
|
|
82
89
|
if (includeMemory && startMemory !== undefined) {
|
|
83
|
-
|
|
90
|
+
try {
|
|
91
|
+
const endMemory = process.memoryUsage();
|
|
92
|
+
// Calculate the memory difference, ensuring it's never negative
|
|
93
|
+
const memoryDiff = endMemory.heapUsed - startMemory.heapUsed;
|
|
94
|
+
execution.memoryUsage = Math.max(0, memoryDiff); // Ensure non-negative value
|
|
95
|
+
// If memory decreased, store a separate field for better visualization
|
|
96
|
+
if (memoryDiff < 0) {
|
|
97
|
+
execution.memoryReleased = Math.abs(memoryDiff);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
console.warn('Error calculating memory usage:', e);
|
|
102
|
+
}
|
|
84
103
|
}
|
|
85
104
|
// Restore the previous current execution
|
|
86
105
|
this._currentExecution = previousExecution;
|
|
@@ -99,14 +118,45 @@ class ExecutionTracker {
|
|
|
99
118
|
* @returns A tracked version of the function
|
|
100
119
|
*/
|
|
101
120
|
createTrackable(fn, options) {
|
|
102
|
-
const self = this;
|
|
103
121
|
const fnName = (options === null || options === void 0 ? void 0 : options.label) || fn.name || 'anonymous';
|
|
104
|
-
|
|
105
|
-
|
|
122
|
+
// Create a tracked version of the function using arrow function to preserve 'this'
|
|
123
|
+
const trackedFn = (...args) => {
|
|
124
|
+
return this.track(() => fn.apply(this, args), {
|
|
106
125
|
...options,
|
|
107
126
|
label: fnName
|
|
108
127
|
});
|
|
109
128
|
};
|
|
129
|
+
// Store the original and tracked function
|
|
130
|
+
this._trackedFunctions.set(fn, trackedFn);
|
|
131
|
+
return trackedFn;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get all execution records
|
|
135
|
+
*
|
|
136
|
+
* @returns A list of execution records
|
|
137
|
+
*/
|
|
138
|
+
getExecutions() {
|
|
139
|
+
return [...this._executions];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Generate a human-friendly memory size string
|
|
143
|
+
*
|
|
144
|
+
* @param bytes - The size in bytes
|
|
145
|
+
* @returns A formatted string
|
|
146
|
+
*/
|
|
147
|
+
formatMemorySize(bytes) {
|
|
148
|
+
if (bytes < 1024) {
|
|
149
|
+
return `${bytes.toFixed(2)}B`;
|
|
150
|
+
}
|
|
151
|
+
else if (bytes < 1024 * 1024) {
|
|
152
|
+
return `${(bytes / 1024).toFixed(2)}KB`;
|
|
153
|
+
}
|
|
154
|
+
else if (bytes < 1024 * 1024 * 1024) {
|
|
155
|
+
return `${(bytes / (1024 * 1024)).toFixed(2)}MB`;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)}GB`;
|
|
159
|
+
}
|
|
110
160
|
}
|
|
111
161
|
/**
|
|
112
162
|
* Get the current call stack
|
|
@@ -114,7 +164,7 @@ class ExecutionTracker {
|
|
|
114
164
|
* @returns The current call stack
|
|
115
165
|
*/
|
|
116
166
|
getCallStack() {
|
|
117
|
-
return this._callStack
|
|
167
|
+
return [...this._callStack];
|
|
118
168
|
}
|
|
119
169
|
/**
|
|
120
170
|
* Generate a visual representation of the execution flow
|
|
@@ -122,53 +172,50 @@ class ExecutionTracker {
|
|
|
122
172
|
* @returns ASCII flow chart of the execution
|
|
123
173
|
*/
|
|
124
174
|
generateFlowChart() {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
175
|
+
let result = '';
|
|
176
|
+
// Process each execution
|
|
177
|
+
this._executions.forEach(execution => {
|
|
178
|
+
result = this.printExecutionTree(execution, result);
|
|
179
|
+
});
|
|
180
|
+
return result;
|
|
129
181
|
}
|
|
130
182
|
/**
|
|
131
|
-
*
|
|
183
|
+
* Recursively print an execution tree
|
|
132
184
|
*
|
|
133
|
-
* @param
|
|
134
|
-
* @
|
|
185
|
+
* @param execution - The root execution
|
|
186
|
+
* @param result - The output string
|
|
187
|
+
* @returns The updated result string
|
|
135
188
|
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
result.
|
|
142
|
-
name: execution.name,
|
|
143
|
-
duration: execution.duration,
|
|
144
|
-
isSlow: execution.isSlow,
|
|
145
|
-
memoryUsage: execution.memoryUsage,
|
|
146
|
-
level: execution.level,
|
|
147
|
-
});
|
|
148
|
-
// Add children recursively
|
|
149
|
-
this.addChildrenToResult(execution.children, result);
|
|
189
|
+
printExecutionTree(execution, result) {
|
|
190
|
+
// Print this execution
|
|
191
|
+
result = this.printSingleExecution(execution, result);
|
|
192
|
+
// Print children recursively
|
|
193
|
+
execution.children.forEach(child => {
|
|
194
|
+
result = this.printExecutionTree(child, result);
|
|
150
195
|
});
|
|
151
196
|
return result;
|
|
152
197
|
}
|
|
153
198
|
/**
|
|
154
|
-
*
|
|
199
|
+
* Print a single execution with appropriate formatting
|
|
155
200
|
*
|
|
156
|
-
* @param
|
|
157
|
-
* @param result - The result
|
|
201
|
+
* @param execution - The execution to print
|
|
202
|
+
* @param result - The result string to append to
|
|
203
|
+
* @returns The updated result string
|
|
158
204
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
205
|
+
printSingleExecution(execution, result) {
|
|
206
|
+
const indent = ' '.repeat(execution.level);
|
|
207
|
+
const durationStr = execution.duration.toFixed(2);
|
|
208
|
+
const slowMarker = execution.isSlow ? ' [SLOW]' : '';
|
|
209
|
+
let memoryStr = '';
|
|
210
|
+
if (execution.memoryUsage !== undefined) {
|
|
211
|
+
memoryStr = ` [${this.formatMemorySize(execution.memoryUsage)}]`;
|
|
212
|
+
}
|
|
213
|
+
result += `${indent}→ ${execution.name} (${durationStr}ms)${slowMarker}${memoryStr}\n`;
|
|
214
|
+
// Add connector if this execution has children
|
|
215
|
+
if (execution.children.length > 0) {
|
|
216
|
+
result += `${indent} |\n`;
|
|
217
|
+
}
|
|
218
|
+
return result;
|
|
172
219
|
}
|
|
173
220
|
/**
|
|
174
221
|
* Clear all execution records
|
|
@@ -176,15 +223,7 @@ class ExecutionTracker {
|
|
|
176
223
|
clear() {
|
|
177
224
|
this._executions = [];
|
|
178
225
|
this._currentExecution = null;
|
|
179
|
-
this._callStack
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Get all execution records
|
|
183
|
-
*
|
|
184
|
-
* @returns All execution records
|
|
185
|
-
*/
|
|
186
|
-
getExecutions() {
|
|
187
|
-
return [...this._executions];
|
|
226
|
+
this._callStack = [];
|
|
188
227
|
}
|
|
189
228
|
}
|
|
190
229
|
exports.ExecutionTracker = ExecutionTracker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../src/trackers/execution.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../src/trackers/execution.ts"],"names":[],"mappings":";;;AACA,0CAAiD;AACjD,4CAA8E;AAkB9E;;GAEG;AACH,MAAa,gBAAgB;IAQ3B;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