Skip to content

Commit 614e33f

Browse files
committed
Simplify the changed code
1 parent 290ee9e commit 614e33f

File tree

1 file changed

+9
-45
lines changed

1 file changed

+9
-45
lines changed

UnixBench/Run

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ my $TESTDIR = getDir('UB_TESTDIR', $FindBin::Bin . "/testdir");
102102
# System information
103103
my $systemInfo = getSystemInfo();
104104

105-
# System capacity literal
106-
my $systemCapacity = "System Capacity";
105+
# Multi-parallel literal
106+
my $multiParallel = "Multi-parallel copies";
107107

108108
############################################################################
109109
# TEST SPECIFICATIONS
@@ -243,20 +243,17 @@ my $testParams = {
243243
"cat" => 'system',
244244
"options" => "10",
245245
"repeat" => 'long',
246-
"system_capacity_parallel_factor" => 1,
247246
},
248247
"whetstone-double" => {
249248
"logmsg" => "Double-Precision Whetstone",
250249
"cat" => 'system',
251250
"repeat" => 'long',
252-
"system_capacity_parallel_factor" => 1,
253251
},
254252
"syscall" => {
255253
"logmsg" => "System Call Overhead",
256254
"cat" => 'system',
257255
"repeat" => 'long',
258256
"options" => "10",
259-
"system_capacity_parallel_factor" => 1,
260257
},
261258
"context1" => {
262259
"logmsg" => "Pipe-based Context Switching",
@@ -270,103 +267,88 @@ my $testParams = {
270267
"cat" => 'system',
271268
"repeat" => 'long',
272269
"options" => "10",
273-
"system_capacity_parallel_factor" => 1,
274270
},
275271
"spawn" => {
276272
"logmsg" => "Process Creation",
277273
"cat" => 'system',
278274
"options" => "30",
279-
"system_capacity_parallel_factor" => 1,
280275
},
281276
"execl" => {
282277
"logmsg" => "Execl Throughput",
283278
"cat" => 'system',
284279
"options" => "30",
285-
"system_capacity_parallel_factor" => 1,
286280
},
287281
"fstime-w" => {
288282
"logmsg" => "File Write 1024 bufsize 2000 maxblocks",
289283
"cat" => 'system',
290284
"prog" => "${BINDIR}/fstime",
291285
"options" => "-w -t 30 -d \"${TMPDIR}\" -b 1024 -m 2000",
292-
"system_capacity_parallel_factor" => 1,
293286
},
294287
"fstime-r" => {
295288
"logmsg" => "File Read 1024 bufsize 2000 maxblocks",
296289
"cat" => 'system',
297290
"prog" => "${BINDIR}/fstime",
298291
"options" => "-r -t 30 -d \"${TMPDIR}\" -b 1024 -m 2000",
299-
"system_capacity_parallel_factor" => 1,
300292
},
301293
"fstime" => {
302294
"logmsg" => "File Copy 1024 bufsize 2000 maxblocks",
303295
"cat" => 'system',
304296
"prog" => "${BINDIR}/fstime",
305297
"options" => "-c -t 30 -d \"${TMPDIR}\" -b 1024 -m 2000",
306-
"system_capacity_parallel_factor" => 1,
307298
},
308299
"fsbuffer-w" => {
309300
"logmsg" => "File Write 256 bufsize 500 maxblocks",
310301
"cat" => 'system',
311302
"prog" => "${BINDIR}/fstime",
312303
"options" => "-w -t 30 -d \"${TMPDIR}\" -b 256 -m 500",
313-
"system_capacity_parallel_factor" => 1,
314304
},
315305
"fsbuffer-r" => {
316306
"logmsg" => "File Read 256 bufsize 500 maxblocks",
317307
"cat" => 'system',
318308
"prog" => "${BINDIR}/fstime",
319309
"options" => "-r -t 30 -d \"${TMPDIR}\" -b 256 -m 500",
320-
"system_capacity_parallel_factor" => 1,
321310
},
322311
"fsbuffer" => {
323312
"logmsg" => "File Copy 256 bufsize 500 maxblocks",
324313
"cat" => 'system',
325314
"prog" => "${BINDIR}/fstime",
326315
"options" => "-c -t 30 -d \"${TMPDIR}\" -b 256 -m 500",
327-
"system_capacity_parallel_factor" => 1,
328316
},
329317
"fsdisk-w" => {
330318
"logmsg" => "File Write 4096 bufsize 8000 maxblocks",
331319
"cat" => 'system',
332320
"prog" => "${BINDIR}/fstime",
333321
"options" => "-w -t 30 -d \"${TMPDIR}\" -b 4096 -m 8000",
334-
"system_capacity_parallel_factor" => 1,
335322
},
336323
"fsdisk-r" => {
337324
"logmsg" => "File Read 4096 bufsize 8000 maxblocks",
338325
"cat" => 'system',
339326
"prog" => "${BINDIR}/fstime",
340327
"options" => "-r -t 30 -d \"${TMPDIR}\" -b 4096 -m 8000",
341-
"system_capacity_parallel_factor" => 1,
342328
},
343329
"fsdisk" => {
344330
"logmsg" => "File Copy 4096 bufsize 8000 maxblocks",
345331
"cat" => 'system',
346332
"prog" => "${BINDIR}/fstime",
347333
"options" => "-c -t 30 -d \"${TMPDIR}\" -b 4096 -m 8000",
348-
"system_capacity_parallel_factor" => 1,
349334
},
350335
"shell1" => {
351336
"logmsg" => "Shell Scripts (1 concurrent)",
352337
"cat" => 'system',
353338
"prog" => "${BINDIR}/looper",
354339
"options" => "60 \"${BINDIR}/multi.sh\" 1",
355-
"system_capacity_parallel_factor" => 1,
356340
},
357341
"shell8" => {
358342
"logmsg" => "Shell Scripts (8 concurrent)",
359343
"cat" => 'system',
360344
"prog" => "${BINDIR}/looper",
361345
"options" => "60 \"${BINDIR}/multi.sh\" 8",
362-
"system_capacity_parallel_factor" => 1,
363346
},
364347
"shell16" => {
365348
"logmsg" => "Shell Scripts (16 concurrent)",
366349
"cat" => 'system',
367350
"prog" => "${BINDIR}/looper",
368351
"options" => "60 \"${BINDIR}/multi.sh\" 16",
369-
"system_capacity_parallel_factor" => 1,
370352
},
371353

372354
##########################
@@ -378,86 +360,75 @@ my $testParams = {
378360
"cat" => '2d',
379361
"prog" => "${BINDIR}/gfx-x11",
380362
"options" => "rects 3 2",
381-
"system_capacity_parallel_factor" => 1,
382363
},
383364

384365
"2d-lines" => {
385366
"logmsg" => "2D graphics: lines",
386367
"cat" => '2d',
387368
"prog" => "${BINDIR}/gfx-x11",
388369
"options" => "lines 3 2",
389-
"system_capacity_parallel_factor" => 1,
390370
},
391371

392372
"2d-circle" => {
393373
"logmsg" => "2D graphics: circles",
394374
"cat" => '2d',
395375
"prog" => "${BINDIR}/gfx-x11",
396376
"options" => "circle 3 2",
397-
"system_capacity_parallel_factor" => 1,
398377
},
399378

400379
"2d-ellipse" => {
401380
"logmsg" => "2D graphics: ellipses",
402381
"cat" => '2d',
403382
"prog" => "${BINDIR}/gfx-x11",
404383
"options" => "ellipse 3 2",
405-
"system_capacity_parallel_factor" => 1,
406384
},
407385

408386
"2d-shapes" => {
409387
"logmsg" => "2D graphics: polygons",
410388
"cat" => '2d',
411389
"prog" => "${BINDIR}/gfx-x11",
412390
"options" => "shapes 3 2",
413-
"system_capacity_parallel_factor" => 1,
414391
},
415392

416393
"2d-aashapes" => {
417394
"logmsg" => "2D graphics: aa polygons",
418395
"cat" => '2d',
419396
"prog" => "${BINDIR}/gfx-x11",
420397
"options" => "aashapes 3 2",
421-
"system_capacity_parallel_factor" => 1,
422398
},
423399

424400
"2d-polys" => {
425401
"logmsg" => "2D graphics: complex polygons",
426402
"cat" => '2d',
427403
"prog" => "${BINDIR}/gfx-x11",
428404
"options" => "polys 3 2",
429-
"system_capacity_parallel_factor" => 1,
430405
},
431406

432407
"2d-text" => {
433408
"logmsg" => "2D graphics: text",
434409
"cat" => '2d',
435410
"prog" => "${BINDIR}/gfx-x11",
436411
"options" => "text 3 2",
437-
"system_capacity_parallel_factor" => 1,
438412
},
439413

440414
"2d-blit" => {
441415
"logmsg" => "2D graphics: images and blits",
442416
"cat" => '2d',
443417
"prog" => "${BINDIR}/gfx-x11",
444418
"options" => "blit 3 2",
445-
"system_capacity_parallel_factor" => 1,
446419
},
447420

448421
"2d-window" => {
449422
"logmsg" => "2D graphics: windows",
450423
"cat" => '2d',
451424
"prog" => "${BINDIR}/gfx-x11",
452425
"options" => "window 3 2",
453-
"system_capacity_parallel_factor" => 1,
454426
},
455427

456428
"ubgears" => {
457429
"logmsg" => "3D graphics: gears",
458430
"cat" => '3d',
459431
"options" => "-time 20 -v",
460-
"system_capacity_parallel_factor" => 1,
461432
},
462433

463434

@@ -470,72 +441,61 @@ my $testParams = {
470441
"cat" => 'misc',
471442
"prog" => "${BINDIR}/looper",
472443
"options" => "60 $cCompiler cctest.c",
473-
"system_capacity_parallel_factor" => 1,
474444
},
475445
"arithoh" => {
476446
"logmsg" => "Arithoh",
477447
"cat" => 'misc',
478448
"options" => "10",
479-
"system_capacity_parallel_factor" => 1,
480449
},
481450
"short" => {
482451
"logmsg" => "Arithmetic Test (short)",
483452
"cat" => 'misc',
484453
"options" => "10",
485-
"system_capacity_parallel_factor" => 1,
486454
},
487455
"int" => {
488456
"logmsg" => "Arithmetic Test (int)",
489457
"cat" => 'misc',
490458
"options" => "10",
491-
"system_capacity_parallel_factor" => 1,
492459
},
493460
"long" => {
494461
"logmsg" => "Arithmetic Test (long)",
495462
"cat" => 'misc',
496463
"options" => "10",
497-
"system_capacity_parallel_factor" => 1,
498464
},
499465
"float" => {
500466
"logmsg" => "Arithmetic Test (float)",
501467
"cat" => 'misc',
502468
"options" => "10",
503-
"system_capacity_parallel_factor" => 1,
504469
},
505470
"double" => {
506471
"logmsg" => "Arithmetic Test (double)",
507472
"cat" => 'misc',
508473
"options" => "10",
509-
"system_capacity_parallel_factor" => 1,
510474
},
511475
"dc" => {
512476
"logmsg" => "Dc: sqrt(2) to 99 decimal places",
513477
"cat" => 'misc',
514478
"prog" => "${BINDIR}/looper",
515479
"options" => "30 dc",
516480
"stdin" => "dc.dat",
517-
"system_capacity_parallel_factor" => 1,
518481
},
519482
"hanoi" => {
520483
"logmsg" => "Recursion Test -- Tower of Hanoi",
521484
"cat" => 'misc',
522485
"options" => "20",
523-
"system_capacity_parallel_factor" => 1,
524486
},
525487
"grep" => {
526488
"logmsg" => "Grep a large file (system's grep)",
527489
"cat" => 'misc',
528490
"prog" => "${BINDIR}/looper",
529491
"options" => "30 grep -c gimp large.txt",
530-
"system_capacity_parallel_factor" => 1,
531492
},
532493
"sysexec" => {
533494
"logmsg" => "Exec System Call Overhead",
534495
"cat" => 'misc',
535496
"repeat" => 'long',
536497
"prog" => "${BINDIR}/syscall",
537498
"options" => "10 exec",
538-
"system_capacity_parallel_factor" => 1,
539499
},
540500
};
541501

@@ -1464,7 +1424,11 @@ sub runTests {
14641424

14651425
my $benchCopies = $copies;
14661426
if ($benchCopies == 0) {
1467-
$benchCopies = $systemInfo->{'numCpus'} * $params->{'system_capacity_parallel_factor'};
1427+
$benchCopies = $systemInfo->{'numCpus'};
1428+
my $pFactor = $params->{'system_capacity_parallel_factor'};
1429+
if (defined $pFactor) {
1430+
$benchCopies *= $pFactor;
1431+
}
14681432
}
14691433

14701434
# If the benchmark doesn't want to run with this many copies, skip it.
@@ -1627,7 +1591,7 @@ sub summarizeRun {
16271591
strftime("%H:%M:%S", localtime($results->{'end'}));
16281592
printf $reportFd "%s in system; running %s of tests\n",
16291593
number($systemInfo->{'numCpus'}, "CPU"),
1630-
$results->{'copies'} == 0 ? $systemCapacity : number($results->{'copies'}, "parallel copy", "parallel copies");
1594+
$results->{'copies'} == 0 ? $multiParallel : number($results->{'copies'}, "parallel copy", "parallel copies");
16311595
printf $reportFd "\n";
16321596

16331597
# Display the run scores.
@@ -2016,7 +1980,7 @@ sub main {
20161980
# followed by a dual-processing run.
20171981
foreach my $c (@$copies) {
20181982
if ($verbose > 1) {
2019-
printf "Run with %s\n", $c == 0 ? $systemCapacity : number($c, "copy", "copies");
1983+
printf "Run with %s\n", $c == 0 ? $multiParallel : number($c, "copy", "copies");
20201984
}
20211985
my $results = runTests($tests, $verbose, $logFile, $c);
20221986

0 commit comments

Comments
 (0)