ChunkRate
Interface in Runtime
What a device measured of one chunk key: the time one unit takes, as the device learned it from the chunks so far, how many chunks it ran, the longest of them and the units of the last one.
import type { ChunkRate } from 'typeshade'import type { ChunkRate } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
interface ChunkRate { readonly msPerUnit: number; readonly chunks: number; readonly longestMs: number; readonly lastUnits: number;}Description
device.chunkRates holds one for each key a chunked plan named.
Instance properties
msPerUnitread onlynumberThe milliseconds one unit takes: the first chunk’s measured rate, then the mean of the previous rate and the measured one.
chunksread onlynumberHow many chunks of the key the device ran.
longestMsread onlynumberThe longest time one chunk of the key took, in milliseconds.
lastUnitsread onlynumberThe units of the last chunk, at least 1.
Source
src/runtime/chunk.ts, line 21, at commit af54ddad5