/plushcap/analysis/timescale/states-and-dwell-time-with-hyperfunctions

Looking at States and Dwell Time With Hyperfunctions

What's this blog post about?

The text discusses a problem of calculating dwell time or connection time for devices transitioning between states, such as power meters or network-connected devices. It mentions that the solution to this problem can be found using TimescaleDB's hyperfunctions, which are high-performance Rust functions designed for time-series analysis. The author provides a SQL query using state_agg and state_timeline hyperfunctions to calculate dwell times for each device in the given dataset. This solution was not available five years ago when the author first posted about this problem on Timescale Slack, but it is now possible with the addition of over 100 hyperfunctions to TimescaleDB.

Company
Timescale

Date published
March 28, 2024

Author(s)
James Blackwood-Sewell

Word count
702

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.