Skip to content

Commit

Permalink
add fix (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNineteen authored Nov 12, 2024
1 parent 069f676 commit de674c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/view_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@


def random_color_generator():
# take [r, g, b] from colormap
# Dark2 chosen for visibility from
# https://matplotlib.org/stable/users/explain/colors/colormaps.html#qualitative
return plt.colormaps["Dark2"](random.random())[:3]
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
return (r / 255, g / 255, b / 255)


def view_results(paths):
Expand Down
4 changes: 2 additions & 2 deletions src/benchmarks.zig
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,9 @@ pub fn benchmarkCSV(

if (j == runtime_info.fields.len - 1) {
// dont print trailing comma
try writer_average.print("{d}, {d}, {any}, {any}", .{ f_max, f_min, f_mean, f_std_dev });
try writer_average.print("{d}, {d}, {any}, {any}", .{ f_min, f_max, f_mean, f_std_dev });
} else {
try writer_average.print("{d}, {d}, {any}, {any}, ", .{ f_max, f_min, f_mean, f_std_dev });
try writer_average.print("{d}, {d}, {any}, {any}, ", .{ f_min, f_max, f_mean, f_std_dev });
}
}
try writer_average.print("\n", .{});
Expand Down

0 comments on commit de674c5

Please sign in to comment.