Skip to content

Commit

Permalink
Discard runs that didn't start on the hour
Browse files Browse the repository at this point in the history
I started a run between hours a few weeks back to let a database
migration finish without interrupting an actual run. This made the graph
illegible by decreasing the smallest duration between two individual
runs, making chartjs unable to automatically determine the best width
for each column (it made them way too thin). Resolved by discarding any
runs that start more than 3 minutes after the start of each hour.
  • Loading branch information
rossjrw committed Jun 20, 2024
1 parent 940047c commit db90f03
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stats-frontend/graphs.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
}
})

// Discard any activations that didn't start on the hour
recentNotifications.activations = recentNotifications.activations.filter(
activation => activation["start_timestamp"] % 3600 < 180
)

// Bind channels data to activations data
for (
let activationIndex = 0;
Expand Down

0 comments on commit db90f03

Please sign in to comment.