arrayPerformance provides main programs that demonstrate performance of large arrays and can also be used to check for memory leaks. Checking for memory leaks can be accomplished by running the programs with valgrind or some other memory check program.
For more information about EPICS generally, please refer to the home page of the Experimental Physics and Industrial Control System.
The programs are:
Each has support for -help.
mrk> pwd /home/epicsv4/master/exampleJava/arrayPerformance/shell mrk> ./arrayPerformance -help recordName size delay providerName nMonitor default arrayPerformance 10000000 0.0001 local 1 mrk> ./longArrayMonitor -help channelName default arrayPerformance mrk> ./longArrayGet -help channelName iterBetweenCreateChannel iterBetweenCreateChannelGet delayTime default arrayPerformance 0 0 1 mrk> ./longArrayPutMain -help channelName arraySize iterBetweenCreateChannel iterBetweenCreateChannelPut delayTime default arrayPerformance 10 0 0 1 mrk>
Note: These may fail if run on a platform that does not have sufficient memory,
To see an example just execute the following commands in four different terminal windows:
./arrayPerformanceMain ./longArrayMonitorMain ./longArrayGetMain ./longArrayPutMain
Each program generates a report every second when it has something to report. Examples are:
./arrayPerformanceMain
arrayPerformance 10000000 0.0001 local 1 2 0
...
arrayPerformance value 34 time 1.055 Iterations/sec 10.42654028436019 megaElements/sec 104.26540284360189
monitors/sec 11 first 35 last 35 changed {1, 2} overrun {} megaElements/sec 103.09278350515464
arrayPerformance value 44 time 1.002 Iterations/sec 9.980039920159681 megaElements/sec 99.80039920159682
monitors/sec 11 first 46 last 46 changed {1, 2} overrun {} megaElements/sec 101.75763182238668
arrayPerformance value 56 time 1.088 Iterations/sec 11.029411764705882 megaElements/sec 110.29411764705881
monitors/sec 12 first 58 last 58 changed {1, 2} overrun {} megaElements/sec 113.42155009451794
arrayPerformance value 67 time 1.037 Iterations/sec 10.607521697203472 megaElements/sec 106.07521697203472
monitors/sec 11 first 69 last 69 changed {1, 2} overrun {} megaElements/sec 102.1355617455896
arrayPerformance value 79 time 1.035 Iterations/sec 11.594202898550726 megaElements/sec 115.94202898550725
monitors/sec 13 first 82 last 82 changed {1, 2} overrun {} megaElements/sec 124.52107279693486
arrayPerformance value 93 time 1.025 Iterations/sec 13.658536585365855 megaElements/sec 136.58536585365854
monitors/sec 14 first 96 last 96 changed {1, 2} overrun {} megaElements/sec 138.6138613861386
...
./longArrayMonitorMain
longArrayMonitorMain arrayPerformance 2 0
...
monitors/sec 3 first 176 last 176 changed {1, 2} overrun {1, 2} megaElements/sec 25.10460251046025
monitors/sec 4 first 190 last 190 changed {1, 2} overrun {1, 2} megaElements/sec 29.940119760479043
monitors/sec 4 first 203 last 203 changed {1, 2} overrun {1, 2} megaElements/sec 31.746031746031747
monitors/sec 3 first 213 last 213 changed {1, 2} overrun {1, 2} megaElements/sec 22.900763358778626
monitors/sec 3 first 224 last 224 changed {1, 2} overrun {1, 2} megaElements/sec 27.598896044158234
monitors/sec 4 first 236 last 236 changed {1, 2} overrun {1, 2} megaElements/sec 31.08003108003108
monitors/sec 3 first 246 last 246 changed {1, 2} overrun {1, 2} megaElements/sec 28.90173410404624
...
./longArrayPutMain longArrayPutMain arrayPerformance 10 0 0 1 ... put numChannelPut 0 Elements/sec 79.8819 put numChannelPut 1 Elements/sec 79.8598 ...
./longArrayGetMain longArrayGetMain arrayPerformance 0 0 1 ... get kiloElements/sec 7384.61 get kiloElements/sec 8726.34 ...
The arguments for arrayPerforamanceMain are:
arrayPerformance creates a PVRecord that has the structure:.
recordName
long[] value
timeStamp timeStamp
alarm alarm
Thus it holds an array of 64 bit integers.
arrayPerformance creates a separate thread that runs until stop is called. arrayPerformance does the following:
This is a pvAccess client that monitors an arrayPerformance record. It generates a report every second showing how many elements has received. For every monitor it also checks that the number of elements is >0 and the the first element equals the last element. It reports an error if either of these conditions is not true.
The arguments for longArrayMonitorMain are:
This is a pvAccess client that uses channelGet to access an arrayPerformance record. Every second it produces a report.
The arguments for longArrayGetMain are:
This is a pvAccess client that uses channelPut to access an arrayPerformance record. Every second it produces a report.
The arguments for longArrayPutMain are: