Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abf5733

Browse files
committed
Hardcode MAX_TRACES and MAX_TRACERS
1 parent a2a2fb6 commit abf5733

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Tracer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const { maxTraces, maxTracers } = process.env;
1+
const MAX_TRACES = 1000000;
2+
const MAX_TRACERS = 100;
23

34
class Tracer {
45
static addTracer(className, title) {
@@ -16,8 +17,8 @@ class Tracer {
1617
args: JSON.parse(JSON.stringify(args)),
1718
};
1819
this.traces.push(trace);
19-
if (this.traces.length > maxTraces) throw new Error('Traces Limit Exceeded');
20-
if (this.tracerCount > maxTracers) throw new Error('Tracers Limit Exceeded');
20+
if (this.traces.length > MAX_TRACES) throw new Error('Traces Limit Exceeded');
21+
if (this.tracerCount > MAX_TRACERS) throw new Error('Tracers Limit Exceeded');
2122
}
2223

2324
constructor(title = this.constructor.name) {

0 commit comments

Comments
 (0)