Skip to content

Commit

Permalink
crash_handler: support printing windows version (#13157)
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro authored Aug 8, 2024
1 parent d74a192 commit 9d74b5b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crash_handler.zig
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,8 @@ pub fn printMetadata(writer: anytype) !void {
}
} else if (bun.Environment.isMac) {
try writer.print("macOS v{s}\n", .{platform.version});
} else if (bun.Environment.isWindows) {
try writer.print("Windows v{s}\n", .{std.zig.system.windows.detectRuntimeVersion()});
}

if (!cpu_features.isEmpty()) {
Expand Down Expand Up @@ -884,10 +886,12 @@ pub fn printMetadata(writer: anytype) !void {
&peak_commit,
&page_faults,
);
try writer.print("Elapsed: {d}ms | User: {d}ms | Sys: {d}ms\nRSS: {:<3.2} | Peak: {:<3.2} | Commit: {:<3.2} | Faults: {d}\n", .{
try writer.print("Elapsed: {d}ms | User: {d}ms | Sys: {d}ms\n", .{
elapsed_msecs,
user_msecs,
system_msecs,
});
try writer.print("RSS: {:<3.2} | Peak: {:<3.2} | Commit: {:<3.2} | Faults: {d}\n", .{
std.fmt.fmtIntSizeDec(current_rss),
std.fmt.fmtIntSizeDec(peak_rss),
std.fmt.fmtIntSizeDec(current_commit),
Expand Down

0 comments on commit 9d74b5b

Please sign in to comment.