Content-Length: 278761 | pFad | http://github.com/algorithm-visualizer/tracers.js/commit/abf573340e2c58be43931eaa9e2bc691c486ccf3

29 Hardcode MAX_TRACES and MAX_TRACERS · algorithm-visualizer/tracers.js@abf5733 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/algorithm-visualizer/tracers.js/commit/abf573340e2c58be43931eaa9e2bc691c486ccf3

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy