This PR adds a new set of tests for sigproc.Counter. The tests are pretty thorough and test the generated time axis .offset values as well as the counter values themselves.
In the same commit I modified Counter to sastisfy the unit tests. This required a near total rewrite of the publish method.
I tried for hours to satisfy the unit tests with dispatch_rate="realtime" without using a state variables to keep track of counters and time-since start. I also tried resetting those variables to avoid precision errors as the numbers get very large. In the end, I couldn't succeed, and I left the variables as resetting on startup but never resetting as progress continues.
This PR adds a new set of tests for sigproc.Counter. The tests are pretty thorough and test the generated time axis .offset values as well as the counter values themselves.
In the same commit I modified Counter to sastisfy the unit tests. This required a near total rewrite of the
publish
method.I tried for hours to satisfy the unit tests with
dispatch_rate="realtime"
without using a state variables to keep track of counters and time-since start. I also tried resetting those variables to avoid precision errors as the numbers get very large. In the end, I couldn't succeed, and I left the variables as resetting on startup but never resetting as progress continues.