Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / flattenUsageByModel

Function: flattenUsageByModel()

ts
function flattenUsageByModel(byModel): readonly ModelUsage[];

Defined in: packages/core/src/types/run.ts:93

Snapshot helper used by @graphorin/observability aggregators to convert the on-disk usageByModel shape into the canonical ModelUsage array. Pure utility — kept in core so consumers do not have to take an observability dependency just to flatten a run-state breakdown.

Parameters

ParameterType
byModel| RunStateUsageByModel | undefined

Returns

readonly ModelUsage[]

Stable