Skip to main content

object_json

Function object_json 

Source
pub fn object_json(figures: &[(String, Duration)]) -> String
Expand description

What: The figures as a JSON object from step name to milliseconds. Why: Both timing records carry it under one key, so a reader asks one question of both files.

In TS you’d write (pseudocode):

JSON.stringify(Object.fromEntries(figures.map(([step, gap]) => [step, gap])))