nexyron.global_time_bins

Generic Description

Aggregate global timeline activity into fixed-width bins for heatmap and overview views.

Simple example:

CALL nexyron.global_time_bins(0, 60000, 'heart_rate', 96)
YIELD bin_index, start_ts, end_ts, weight, contribution_count, subject_ids
RETURN bin_index, start_ts, end_ts, weight, contribution_count, subject_ids
ORDER BY bin_index

The time bounds accept canonical i64 epoch-millisecond integers. For example, currenttimestamp() - 2592000000 is a valid lower bound for the previous 30 days, and timestamp() returns the same integer millisecond format.

Consumer-Level Explanation

Use nexyron.global_time_bins when a UI or analytical query needs the shape of temporal activity, not every concrete timeline contribution. It returns one row per requested time bucket, which keeps the result size predictable for graph overlays, dashboards, and overview panels.

Conceptual Explanation

nexyron.global_time_bins is the aggregate companion to nexyron.global_time_range. Both read the same global timeline index, but they answer different questions.

global_time_range ranks subjects over one window. global_time_bins divides the window into a fixed number of intervals and reports the activity in each interval. Each bin includes:

This is the right procedure for a heatmap-style timeline under a graph view because the client can render from a fixed number of rows and intersect subject_ids with the currently displayed graph nodes.

When callers pass the full unbounded range 0 to 9223372036854775807, Nexyron first finds the actual minimum and maximum timestamps among matching timeline entries, then divides that real data extent into bins. That keeps UI heatmaps from collapsing all ordinary epoch-millisecond events into the first bucket of an enormous sentinel range.

More Detailed Explanation

In practical queries, start by deciding the row grain you want after the call: one row per node, one row per path, one row per registry object, one row per artifact, or one row per summary. Then keep that grain explicit with YIELD and named projections. That is the difference between a useful planner-facing example and a vague call that downstream tooling cannot safely compose. For contract-driven procedures, the executable examples on these pages intentionally inspect procedure metadata unless the required named artifacts are created in the same example.

Advanced Example

CALL nexyron.global_time_bins(0, 9223372036854775807, null, 64)
YIELD bin_index, start_ts, end_ts, weight, contribution_count, subject_ids
WITH bin_index, start_ts, end_ts, weight, contribution_count, size(subject_ids) AS active_subjects
RETURN bin_index, start_ts, end_ts, contribution_count, active_subjects, weight
ORDER BY bin_index

Real Use Cases

Real Limitations And Tradeoffs