Skip to content
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

Add Performance Counters to AbstractDeviceAdapter #929

Open
timburke opened this issue Dec 19, 2019 · 0 comments
Open

Add Performance Counters to AbstractDeviceAdapter #929

timburke opened this issue Dec 19, 2019 · 0 comments

Comments

@timburke
Copy link
Member

We currently have an adhoc set of performance counters in BLED112DeviceAdapter counting things like advertisements seen, decryption errors, etc. This is really useful because DeviceAdapters are low level pieces of code that need to keep working in the face of random input so they can't raise an exception every time they see something that's not right.

Sometimes the right choice is to log it but there are times when that's not possible because the situation could happen 100s of times per second, resulting in a log flood.

For those kinds of things, we want to be able to just increment a performance counter that we can query periodically later to get a sense for how things are progressing.

We need to figure out a couple of things:

  • What is the interface going to be on AbstractDeviceAdapter for querying a performance counter?
  • How are we going to handle the fact that the specific counters for each device adapter will be different.
  • Can we come up with an easy way to use the counters. A bare bones approach would be to just have a dict but then the code to increment a counter is long and ugly, so is there a better way?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant