sasaki77 / archiverappliance-datasource

EPICS Archiver Appliance plugin for Grafana dashboard
https://sasaki77.github.io/archiverappliance-datasource
MIT License
14 stars 7 forks source link

Parallel queries enhancement. #42

Closed n-wbrown closed 3 years ago

n-wbrown commented 3 years ago

Addresses #37.

This makes the queries to the Archiver execute in parallel as opposed to serially.

Should be merged after #41. Most of the diff shown in this PR is caused by an early merge I made in order to handle some incompatibilities between the two branches.

n-wbrown commented 3 years ago

A timeout condition needs to be implemented

n-wbrown commented 3 years ago

I believe this is now ready for merging.

sasaki77 commented 3 years ago

I'm not sure the reason, but top and bottom functions doesn't work properly with this PR. Could you check this? aa-grafana

n-wbrown commented 3 years ago

@sasaki77 Thanks for letting me know. This issue should be fixed now.

My mistake was that in addition to parallelizing the queries, I had also parallelized the application of the functions. This caused problems as the top and bottom functions need knowledge of the other series in order to function and thus should not be applied to each request in an independent thread. I've moved the application of the functions back into the main process again and in local testing, the issue appears resolved.

sasaki77 commented 3 years ago

Thanks for fixing! Looks OK.