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 {
1212 private static int tracerCount = 0 ;
1313 private static ArrayList <Trace > traces = new ArrayList <>();
1414
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 ;
1717
1818 private static class Trace {
1919 private String tracerKey ;
@@ -38,8 +38,10 @@ private static String addTracer(String className, String title) {
3838 protected static void addTrace (String tracerKey , String method , Object [] args ) {
3939 Trace trace = new Trace (tracerKey , method , args );
4040 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" );
4345 }
4446
4547 protected String key ;
You can’t perform that action at this time.
0 commit comments