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.
The programs are:
Each has support for -help.
mrk> pwd /home/hg/exampleCPP/arrayPerformance mrk> bin/$EPICS_HOST_ARCH/arrayPerformanceMain -help recordName size delay providerName nMonitor queueSize default arrayPerformance 10000000 0.0001 local 1 2 mrk> bin/$EPICS_HOST_ARCH/longArrayMonitorMain -help channelName queueSize default arrayPerformance 2 mrk> bin/$EPICS_HOST_ARCH/longArrayGetMain -help channelName iterBetweenCreateChannel iterBetweenCreateChannelGet delayTime default arrayPerformance 0 0 1 mrk> bin/$EPICS_HOST_ARCH/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:
bin/$EPICS_HOST_ARCH/arrayPerformanceMain bin/$EPICS_HOST_ARCH/longArrayMonitorMain bin/$EPICS_HOST_ARCH/longArrayGetMain bin/$EPICS_HOST_ARCH/longArrayPutMain
Each program generates a report every second when it has something to report. Examples are:
mrk> bin/$EPICS_HOST_ARCH/arrayPerformanceMain arrayPerformance 10000000 0.0001 local 1 2 ... arrayPerformance value 691 time 1.00585 Iterations/sec 19.8837 megaElements/sec 198.837 monitors/sec 20 first 691 last 691 changed {1, 2} overrun {} megaElements/sec 192.453 arrayPerformance value 709 time 1.00279 Iterations/sec 17.9499 megaElements/sec 179.499 monitors/sec 19 first 710 last 710 changed {1, 2} overrun {} megaElements/sec 184.922 arrayPerformance value 729 time 1.01898 Iterations/sec 19.6274 megaElements/sec 196.274 monitors/sec 20 first 730 last 730 changed {1, 2} overrun {} megaElements/sec 195.467 ...
mrk> bin/$EPICS_HOST_ARCH/longArrayMonitorMain longArrayMonitorMain arrayPerformance 2 0 ... monitors/sec 9 first 1068 last 1068 changed {1, 2} overrun {1, 2} megaElements/sec 89.761 monitors/sec 9 first 1084 last 1084 changed {1, 2} overrun {1, 2} megaElements/sec 87.1092 monitors/sec 9 first 1101 last 1101 changed {1, 2} overrun {} megaElements/sec 86.267 ...
mrk> bin/$EPICS_HOST_ARCH/longArrayPutMain longArrayPutMain arrayPerformance 10 0 0 1 ... put numChannelPut 0 Elements/sec 79.8819 put numChannelPut 1 Elements/sec 79.8598 ...
mrk> bin/$EPICS_HOST_ARCH/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 alarmThus 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: