-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review performance testing #78
Comments
Hi, Thanks for doing this, I believe this is very useful. I just have few comments:
def echo(x): print('New PV value: %s' % x) channel.monitor(echo, 'field(value,alarm,timeStamp)') This will not affect performance results, however.
Hope this helps, if you need more info, or would like access to APS git repos I mentioned, please let me know. |
Hi @sveseli thanks for you fast response. I will take a look through your comments. |
Hi @sveseli may I ask a quick question about the requestDescriptor parameter in the Channel.get method? I appear to get the same response (which I believe is a full structure) whether I have: Am I misunderstanding this parameter? In both cases in my test the response I got was:
Thanks! |
You are correct as far as the parameter usage. Let me look into this and see what is going on. |
This is expected, the behavior depends on the specific PVA server that you're talking to, due to a disagreement several years ago between Marty Kraimer and Michael Davidsaver. Marty's original idea was that the server should only return exactly the list of fields you asked for in the pvRequest, but Michael's implementation of the QSRV server ignores that and sends everything (so it could add extra fields beyond those requested if it needed to). |
Thanks @anjohnson . I just checked the parameter operation against PvaServer (PvDatabase based server), and it works as expected, sending only fields that were requested. |
To reiterate... The pvRequest mask is not ignored. Rather, it is interpreted differently by QSRV. The complete data structure is shown. However, only changes to selected fields are sent over the network. So for a field which is not selected, a client will see the definition (if it looks), but will not receive data updates. |
@ajgdls , here is how you can test this against PvaServer instance. Terminal 1: Type "help", "copyright", "credits" or "license" for more information. >>> from pvapy import * >>> nt = NtScalar(INT,10) >>> s = PvaServer('nt', nt) >>> Terminal 2: $ python -c "from pvapy import *; c = Channel('nt'); pv = c.get(); print(pv)" structure int value 10 $ python -c "from pvapy import *; c = Channel('nt'); pv = c.get('field(value,alarm)'); print(pv)" structure int value 10 alarm_t alarm int severity 0 int status 0 string message $ python -c "from pvapy import *; c = Channel('nt'); pv = c.get('field(value,alarm,timeStamp)'); print(pv)" structure int value 10 alarm_t alarm int severity 0 int status 0 string message time_t timeStamp long secondsPastEpoch 0 int nanoseconds 0 int userTag 0 |
@mdavidsaver Thanks, I wasn't aware of the "only send changes to the fields" interpretation that QSRV takes for the field list. |
OK I understand, thanks all (and thanks @sveseli for the example you provide) |
Hello, I've written a small Python module https://github.com/ajgdls/EPICSPyClientPerformance to compare the performance of 6 Python based EPICS clients. I have attempted to test each in a consistent way, and the README has some preliminary results for monitoring 1000 records at 10Hz for 1000 samples.
I would really appreciate it if this module owner would review EPICSPyClientPerformance test code for this client implementation to check that I'm actually testing in the correct and most efficient way. I would be happy to make updates that shows an increase in performance for this client.
This testing is driven by Diamond Light Source, and on 1st December the tests will be re-run against latest PyPI versions and then published (probably tech-talk) for further discussion, so if anyone wants to push performance optimisations they will get picked up on that date.
Thanks for taking a look, looking forward to hearing from everyone.
The text was updated successfully, but these errors were encountered: