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();