@@ -21,6 +21,7 @@ public class SNBBenchmarkController extends AbstractBenchmarkController {
21
21
private int numberOfOperations = -1 ;
22
22
private int scaleFactor = -1 ;
23
23
private int seed = -1 ;
24
+ private int warmupCount = -1 ;
24
25
private double timeCompressionRatio = -1 ;
25
26
private long loadingStarted = -1 ;
26
27
private long loadingEnded ;
@@ -61,13 +62,14 @@ public void init() throws Exception {
61
62
if (iterator .hasNext ()) {
62
63
try {
63
64
numberOfOperations = iterator .next ().asLiteral ().getInt ();
65
+ LOGGER .info ("Number of operations: " + String .valueOf (numberOfOperations ));
64
66
} catch (Exception e ) {
65
67
LOGGER .error ("Exception while parsing parameter." , e );
66
68
}
67
69
}
68
70
if (numberOfOperations < 0 ) {
69
71
LOGGER .error ("Couldn't get the number of operations from the parameter model. Using the default value." );
70
- numberOfOperations = 10000 ;
72
+ numberOfOperations = 20000 ;
71
73
}
72
74
}
73
75
@@ -97,6 +99,7 @@ public void init() throws Exception {
97
99
if (iterator .hasNext ()) {
98
100
try {
99
101
scaleFactor = iterator .next ().asLiteral ().getInt ();
102
+ LOGGER .info ("Scale Factor: " + String .valueOf (scaleFactor ));
100
103
} catch (Exception e ) {
101
104
LOGGER .error ("Exception while parsing parameter." , e );
102
105
}
@@ -116,12 +119,32 @@ public void init() throws Exception {
116
119
if (iterator .hasNext ()) {
117
120
try {
118
121
seed = iterator .next ().asLiteral ().getInt ();
122
+ LOGGER .info ("Seed: " + String .valueOf (seed ));
119
123
} catch (Exception e ) {
120
124
LOGGER .error ("Exception while parsing parameter." , e );
121
125
}
122
126
}
123
127
}
124
128
129
+ /* Warmup count */
130
+ if (warmupCount == -1 ) {
131
+
132
+ iterator = benchmarkParamModel .listObjectsOfProperty (
133
+ benchmarkParamModel .getProperty ("http://w3id.org/bench#warmupPercent" ));
134
+ if (iterator .hasNext ()) {
135
+ try {
136
+ int warmupPercent ;
137
+ warmupPercent = iterator .next ().asLiteral ().getInt ();
138
+ if (warmupPercent < 0 || warmupPercent > 100 )
139
+ warmupPercent = 20 ;
140
+ warmupCount = numberOfOperations * warmupPercent / 100 ;
141
+ LOGGER .info ("Warmup count: " + String .valueOf (warmupCount ));
142
+ } catch (Exception e ) {
143
+ LOGGER .error ("Exception while parsing parameter." , e );
144
+ }
145
+ }
146
+ }
147
+
125
148
/* Sequential tasks */
126
149
if (sequential_tasks == false ) {
127
150
@@ -131,7 +154,7 @@ public void init() throws Exception {
131
154
try {
132
155
//sequential_tasks = (iterator.next().asLiteral().getInt() == 0 ? false : true);
133
156
sequential_tasks = iterator .next ().asLiteral ().getBoolean ();
134
- LOGGER .info ("Boolean : " + String .valueOf (sequential_tasks ));
157
+ LOGGER .info ("Sequential task : " + String .valueOf (sequential_tasks ));
135
158
} catch (Exception e ) {
136
159
LOGGER .error ("Exception while parsing parameter." , e );
137
160
}
@@ -167,6 +190,7 @@ public void init() throws Exception {
167
190
SNBConstants .GENERATOR_SCALE_FACTOR + "=" + scaleFactor ,
168
191
SNBConstants .GENERATOR_SEED + "=" + seed ,
169
192
SNBConstants .GENERATOR_NUMBER_OF_OPERATIONS + "=" + numberOfOperations ,
193
+ SNBConstants .WARMUP_COUNT + "=" + warmupCount ,
170
194
SNBConstants .GENERATOR_INITIAL_TIME_COMPRESSION_RATIO + "=" + timeCompressionRatio ,
171
195
SNBConstants .DISABLE_ENABLE_QUERY_TYPE + "=" + disableEnableQueryType
172
196
};
@@ -181,7 +205,8 @@ public void init() throws Exception {
181
205
if (sequential_tasks == true )
182
206
envVariables = ArrayUtils .add (envVariables , "ACKNOWLEDGEMENT_FLAG=true" );
183
207
createEvaluationStorage (DEFAULT_EVAL_STORAGE_IMAGE , envVariables );
184
- // TODO: get KPIs for evaluation module
208
+
209
+ // KPIs for evaluation module
185
210
envVariablesEvaluationModule .add (SNBConstants .EVALUATION_QE_AVERAGE_TIME + "=" + "http://w3id.org/bench#QEAverageTime" );
186
211
envVariablesEvaluationModule .add (SNBConstants .EVALUATION_Q01E_AVERAGE_TIME + "=" + "http://w3id.org/bench#Q01EAverageTime" );
187
212
envVariablesEvaluationModule .add (SNBConstants .EVALUATION_Q02E_AVERAGE_TIME + "=" + "http://w3id.org/bench#Q02EAverageTime" );
0 commit comments