How fast an organization's storage is growing

Featurekamo-shared-library
Shipped
September 7, 2026 at 6:51 AM UTC
Author
Kamo
Commit
f944db8

The snapshot table has recorded a daily position per organization since metering began, and nothing read two rows of it together. So the only question storage could answer was "how full are you", never "when do you run out" — and the first is a warning that arrives on the day it is already too late. StorageTrend differences the current snapshot against the oldest one inside a seven-day window and reports bytes per day. Two small indexed reads against rows the nightly sweep has already written; never a pass over the files themselves. Everything it REFUSES to answer matters more than the arithmetic. A negative rate is not a forecast that storage will empty itself — an org that deleted a folder last Tuesday has not established a trend, and a signed rate puts "full in -40 days" on a launchpad. One snapshot is not a span. A sweep that missed four nights widens the span rather than cramming five days of growth into one. And growth smaller than the span floors to zero bytes a day, which is why isKnown() exists rather than leaving a caller to divide by it and print "full in Infinity days".

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing