I have a list of steadily growing values like 19:57(12.259), 19:58(13.101) stored in mongodb. Now I want to find out if the value grew 50% within 30 minutes within the last 3 hours.
My first naive approach was to take the value from 3 hours ago (a) and then look for the point in time when the value is greater than or equal (a*1.5). Then - in a post check - I test if this increase happened within 30 minutes.
This does work if the post condition is fulfilled but fails if it doesn't and there would be another, better candidate. In this case I would need to go on looking but there has to be a better way.
Basically I think, I am looking for a way to find a certain steepness on a curve.