@@ -199,25 +199,25 @@ discard block |
||
199 | 199 | $min = 1e99; |
200 | 200 | $max = 0; |
201 | 201 | foreach ($results as $r) { |
202 | - $f = $r->flops / (4.3e9 *3600); |
|
202 | + $f = $r->flops/(4.3e9*3600); |
|
203 | 203 | if ($f > $max) $max = $f; |
204 | 204 | if ($f < $min) $min = $f; |
205 | 205 | $x[] = $f; |
206 | 206 | } |
207 | 207 | $n = 800; |
208 | 208 | $count = []; |
209 | - for ($i=0; $i<$n; $i++) { |
|
209 | + for ($i = 0; $i < $n; $i++) { |
|
210 | 210 | $count[$i] = 0; |
211 | 211 | } |
212 | 212 | $range = $max - $min; |
213 | 213 | foreach ($x as $f) { |
214 | - $d = intval($n*($f-$min)/$range); |
|
215 | - if ($d >= $n) $d = $n-1; |
|
214 | + $d = intval($n*($f - $min)/$range); |
|
215 | + if ($d >= $n) $d = $n - 1; |
|
216 | 216 | $count[$d] += 1; |
217 | 217 | } |
218 | 218 | $data = []; |
219 | - for ($i=0; $i<$n; $i++) { |
|
220 | - $data[] = [$min+($i*$range)/$n, $count[$i]]; |
|
219 | + for ($i = 0; $i < $n; $i++) { |
|
220 | + $data[] = [$min + ($i*$range)/$n, $count[$i]]; |
|
221 | 221 | } |
222 | 222 | graph($data, 'hours', 'count'); |
223 | 223 | page_tail(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | $batch = BoincBatch::lookup_id(get_int('batch_id')); |
227 | 227 | if (!$batch) error_page('no batch'); |
228 | -switch(get_str('action')) { |
|
228 | +switch (get_str('action')) { |
|
229 | 229 | case 'err_host': |
230 | 230 | err_host($batch); |
231 | 231 | break; |
@@ -183,7 +183,7 @@ |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | function flops_graph($batch) { |
186 | - page_head("Batch $batch->id job runtimes"); |
|
186 | + page_head("batch $batch->id job runtimes"); |
|
187 | 187 | echo " |
188 | 188 | <p> |
189 | 189 | Runtimes of completed jobs, normalized to an average (4.3 GFLOPS) computer. |