## Lux benchmarking script

General Project and community related discussion.

Moderator: coordinators

### Lux benchmarking script

If you ever had to benchmark Lux on different scenes, you may know this is a bit tedious to run it several times by hand and average the results. I had. So i wrote a simple bash script which runs luxconsole with the specified scene for defined number of times and for defined periods (independent from the halttime specified in the scene if any) and then prints the average of kS/s (with normalization if more than 4 passes is specified, i.e. it drops the best and the worst results before averaging).

The usage is pretty simple:
./benchmark.sh <path to luxconsole> <path to testscene lxs>
You can also specify the number of passes and pass length:
./benchmark.sh <luxconsole> <testscene lxs> [time] [passes]
It defaults to 5 passes and 5 minutes (300 secs) per pass.

For example:
Code: Select all
$./benchmark.sh ./luxconsole examples/LuxTime_by_freejack/luxtime.lxs Total passes: 5 per 90 seconds eachWith normalizationRunning pass 1 for 90 seconds...Pass 1 result: 100.57 kS/sRunning pass 2 for 90 seconds..../benchmark.sh: line 49: 5913 Terminated$LUX "$2" 2>$OUTPUTPass 2 result: 99.19 kS/sRunning pass 3 for 90 seconds..../benchmark.sh: line 49:  5961 Terminated      $LUX "$2" 2> $OUTPUTPass 3 result: 99.68 kS/sRunning pass 4 for 90 seconds..../benchmark.sh: line 49: 6008 Terminated$LUX "$2" 2>$OUTPUTPass 4 result: 100.32 kS/sRunning pass 5 for 90 seconds..../benchmark.sh: line 49:  6113 Terminated      $LUX "$2" 2> $OUTPUTPass 5 result: 99.24 kS/sPasses results: 99.19 99.24 99.68 100.32 100.57./benchmark.sh: line 74: 6411 Terminated$LUX "$2" 2>$OUTPUTAverage result: 99.746

By the way, if anybody knows how to get rid of those "Terminated" lines, i'll be glad to know.
Attachments
lux-benchmark.zip
Linux builds packager

SATtva

Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love