From 3867985810af75bc7f2b28f41b674b2322b8e2ea Mon Sep 17 00:00:00 2001 From: Son Luong Ngoc Date: Fri, 19 Jul 2024 15:38:27 +0200 Subject: [PATCH] Profiler: fix wrong field name As reported in #22505, I misread the initial implemenation and named this field wrongly. Given there has been no report about this before this issue, it's safe to assume that the field is not widely used by other folks and therefore, is safe to change. Closes #22505. --- .../devtools/build/lib/profiler/JsonTraceFileWriter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/profiler/JsonTraceFileWriter.java b/src/main/java/com/google/devtools/build/lib/profiler/JsonTraceFileWriter.java index ae3cd9e8c3d73f..d73fa42380960f 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/JsonTraceFileWriter.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/JsonTraceFileWriter.java @@ -225,15 +225,15 @@ public void run() { // The buffer size of 262144 is chosen at random. new OutputStreamWriter( new BufferedOutputStream(outStream, 262144), StandardCharsets.UTF_8))) { - var finishDate = Instant.now(); + var startDate = Instant.now(); writer.beginObject(); writer.name("otherData"); writer.beginObject(); writer.name("bazel_version").value(BlazeVersionInfo.instance().getReleaseName()); writer.name("build_id").value(buildID.toString()); writer.name("output_base").value(outputBase); - writer.name("date").value(finishDate.toString()); - writer.name("profile_finish_ts").value(finishDate.getEpochSecond() * 1000); + writer.name("date").value(startDate.toString()); + writer.name("profile_start_ts").value(startDate.toEpochMilli()); writer.endObject(); writer.name("traceEvents"); writer.beginArray();