File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/org/algorithm_visualizer/tracers Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ public abstract class Tracer {
12
12
private static int tracerCount = 0 ;
13
13
private static ArrayList <Trace > traces = new ArrayList <>();
14
14
15
- private static final int maxTraces = Integer . parseInt ( System . getenv ( "MAX_TRACES" )) ;
16
- private static final int maxTracers = Integer . parseInt ( System . getenv ( "MAX_TRACERS" )) ;
15
+ private static final int MAX_TRACES = 1000000 ;
16
+ private static final int MAX_TRACERS = 100 ;
17
17
18
18
private static class Trace {
19
19
private String tracerKey ;
@@ -38,8 +38,10 @@ private static String addTracer(String className, String title) {
38
38
protected static void addTrace (String tracerKey , String method , Object [] args ) {
39
39
Trace trace = new Trace (tracerKey , method , args );
40
40
traces .add (trace );
41
- if (traces .size () > maxTraces ) throw new Error ("Traces Limit Exceeded" );
42
- if (tracerCount > maxTracers ) throw new Error ("Tracers Limit Exceeded" );
41
+ if (traces .size () > MAX_TRACES )
42
+ throw new Error ("Traces Limit Exceeded" );
43
+ if (tracerCount > MAX_TRACERS )
44
+ throw new Error ("Tracers Limit Exceeded" );
43
45
}
44
46
45
47
protected String key ;
You can’t perform that action at this time.
0 commit comments