File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ namespace Randomize {
139
139
return *this ;
140
140
}
141
141
142
+ // TODO: fix array1d/2d/graph randomizers returning pointer instead of array
142
143
T *create () {
143
144
T *D = new T[_N];
144
145
for (int i = 0 ; i < _N; i++) {
Original file line number Diff line number Diff line change 1
1
#include < string>
2
2
#include < fstream>
3
+ #include < cstdlib>
3
4
#include < json.hpp>
4
5
#include " Tracer.h"
5
6
@@ -9,6 +10,9 @@ using json = nlohmann::json;
9
10
int Tracer::tracerCount = 0 ;
10
11
json Tracer::traces = json::array();
11
12
13
+ const long Tracer::maxTraces = stol(getenv(" MAX_TRACES" ));
14
+ const long Tracer::maxTracers = stol(getenv(" MAX_TRACERS" ));
15
+
12
16
string Tracer::addTracer (string className, string title) {
13
17
string key = to_string (tracerCount++) + " -" + className + " -" + title;
14
18
string method = " construct" ;
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class Tracer {
13
13
static int tracerCount;
14
14
static json traces;
15
15
16
- static const int maxTraces = 1000000 ; // TODO: load from environment variables
17
- static const int maxTracers = 100 ;
16
+ static const long maxTraces;
17
+ static const long maxTracers;
18
18
19
19
static string addTracer (string className, string title);
20
20
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export default {
26
26
return : 'LogTracer' ,
27
27
arguments : [ ] ,
28
28
} , {
29
- name : 'print' ,
29
+ name : 'print' , // TODO: separate into println and print methods
30
30
description : 'Print `message`.' ,
31
31
return : 'LogTracer' ,
32
32
arguments : [
You can’t perform that action at this time.
0 commit comments