Skip to content

@graphty/graphty-element / session / CostMeasurement

Interface: CostMeasurement ​

Defined in: graphty-element/src/session/cost/estimate.ts:174

One completed run, kept so the next estimate of the same algorithm can be scaled from it rather than modelled.

This is the loop that makes the element's estimate better than any consumer's: a consumer sees one number and cannot check it, while the element sees what the run actually took and uses it next time.

Properties ​

algorithm ​

readonly algorithm: AlgorithmKey

Defined in: graphty-element/src/session/cost/estimate.ts:176

Which algorithm was timed.


at ​

readonly at: string

Defined in: graphty-element/src/session/cost/estimate.ts:186

When it ran, as an ISO 8601 timestamp.


edges ​

readonly edges: number

Defined in: graphty-element/src/session/cost/estimate.ts:180

How many edges it covered.


iterations? ​

readonly optional iterations?: number

Defined in: graphty-element/src/session/cost/estimate.ts:182

How many iterations it actually did, when the algorithm is iterative.


machine ​

readonly machine: string

Defined in: graphty-element/src/session/cost/estimate.ts:188

The machine fingerprint it was timed on, so a measurement from elsewhere is not trusted.


nodes ​

readonly nodes: number

Defined in: graphty-element/src/session/cost/estimate.ts:178

How many nodes it covered.


seconds ​

readonly seconds: number

Defined in: graphty-element/src/session/cost/estimate.ts:184

How long it took, in seconds.