@@ -12,10 +12,7 @@ Each result is a NamedTuple with:
1212- `time::Float64`: arbitrary execution time
1313"""
1414function generate_dummy_results ()
15- [
16- (; problem = :toy_problem_1 , time = 0.123 ),
17- (; problem = :toy_problem_2 , time = 0.456 ),
18- ]
15+ [(; problem= :toy_problem_1 , time= 0.123 ), (; problem= :toy_problem_2 , time= 0.456 )]
1916end
2017
2118"""
@@ -44,7 +41,8 @@ Combine benchmark results and metadata into a JSON-friendly dictionary.
4441function build_payload (results:: Vector{<:NamedTuple} , meta:: Dict )
4542 Dict (
4643 " metadata" => meta,
47- " results" => [Dict (" problem" => String (r. problem), " time" => r. time) for r in results],
44+ " results" =>
45+ [Dict (" problem" => String (r. problem), " time" => r. time) for r in results],
4846 )
4947end
5048
@@ -83,10 +81,14 @@ This function performs the following steps:
8381# Returns
8482- The `outpath` of the saved JSON file.
8583"""
86- function benchmark_minimal (; outpath:: AbstractString = joinpath (normpath (@__DIR__ , " .." ), " docs" , " src" , " assets" , " benchmark-minimal" , " data.json" ))
84+ function benchmark_minimal (;
85+ outpath:: AbstractString = joinpath (
86+ normpath (@__DIR__ , " .." ), " docs" , " src" , " assets" , " benchmark-minimal" , " data.json"
87+ ),
88+ )
8789 results = generate_dummy_results ()
8890 meta = generate_metadata ()
8991 payload = build_payload (results, meta)
9092 save_json (payload, outpath)
9193 return outpath
92- end
94+ end
0 commit comments