#387 closed enhancement (fixed)
Make CheckSystem::checkCounter go faster by handling multiple counters with a single sleep
|Reported by:||lovedada||Owned by:||mickem|
Currently if I send over a list of say 5 counters in a checkCounter command, it will take at least 5 seconds (assuming averages=false is not used) because the method CheckSystem::checkCounter creates 5 separate queries and for each query adds one counter, collects data, sleeps for one second, collects data again and then concatenates the result to the value that will be returned. So there are 5 one second sleeps.
The suggested improvement is to reduce the delay to one second by creating one query, adding five counters, collecting data for all five, sleeping for one second, collecting data again for all 5 and then get concatenating and returning the results.
In my brief look at the source code it seems the PDHQuery class used has the capability already to add multiple counters.
Change History (4)
comment:2 Changed 23 months ago by mickem
- Milestone changed from 0.3.x to 0.3.10
- Status changed from new to assigned
comment:3 Changed 15 months ago by mickem
- Milestone changed from 0.3.10 to 0.4.0
- Status changed from assigned to new