-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Fix diff_last aggregate calculation #1634
Conversation
66d97f9
to
fff6b6d
Compare
Job #709: Bundle Size — 15.97MiB (~+0.01%).Metrics (no changes)
Total size by type (2 changes)
|
When testing this PR with an existing chart I get (the server is 3.4.0 release build): And the response is:
It seems the rrd4j persistence service doesn't like the boundary parameter... which is a bummer since it's the one most would have. Against main without the boundary parameter: |
The REST resource does not set an RRD4J persistence service uses current timestamp for |
76aa191
to
ff5038e
Compare
One temporarily solution for RRD4J would be to catch the thrown IAE and return an empty List. |
Signed-off-by: Boris Krivonog boris.krivonog@inova.si Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
…when calculating diff Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
ff5038e
to
841a566
Compare
I created openhab/openhab-addons#14238 |
@ghys May I ask you an additional question? What does happen if you call the |
@cweitkamp it seems so: logInfo('interval', FGWP102WallPlug_ElectricmeterkWh.minimumBetween(now, now.minusDays(30)).getState().toString())
logInfo('interval', FGWP102WallPlug_ElectricmeterkWh.minimumBetween(now.minusDays(30), now).getState().toString())
|
@ghys Thanks for testing. I will take care of that and add checks in OHC The fix for RRD4J has been merged. It takes care of both issues (start > end) and additional boundary value after end of requested time range. |
Excellent, then let's merge #1649. |
Shouldn't the fix be backported to 3.4.x? |
In order to calculate
diff_last
includeboundary=true
parameter when requesting datapoints to read datapoint before requested interval (before datestart), if available. Use that one to calculate diff for first value.fixes #912 - partly, only applies for
diff_last
Signed-off-by: Boris Krivonog boris.krivonog@inova.si