From 2ddacab80af1dca3c04e74809827c47ec4bc8498 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 16 Oct 2023 12:38:47 -0700 Subject: [PATCH] Add start/end timestamps to ActionExecuted event protobuf. Also adds a repeated `Any` field for strategies to report strategy-specific execution details. First commit addressing issue #19471. PiperOrigin-RevId: 573896902 Change-Id: I3d58cdfb503d552999c6261fc7fbd04c7d1de835 --- .../devtools/build/lib/buildeventstream/proto/BUILD | 3 ++- .../buildeventstream/proto/build_event_stream.proto | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/BUILD b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/BUILD index a8864007279a9a..abe0749126e033 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/BUILD +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/BUILD @@ -1,6 +1,6 @@ load("@rules_java//java:defs.bzl", "java_proto_library") -load("//tools/build_rules:utilities.bzl", "java_library_srcs") load("@rules_proto//proto:defs.bzl", "proto_library") +load("//tools/build_rules:utilities.bzl", "java_library_srcs") package(default_visibility = ["//src:__subpackages__"]) @@ -31,6 +31,7 @@ proto_library( "//src/main/protobuf:command_line_proto", "//src/main/protobuf:failure_details_proto", "//src/main/protobuf:invocation_policy_proto", + "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:timestamp_proto", ], diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto index 2988ab57931440..f70bbbe750970b 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto +++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto @@ -18,6 +18,7 @@ syntax = "proto3"; package build_event_stream; +import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "src/main/java/com/google/devtools/build/lib/packages/metrics/package_load_metrics.proto"; @@ -577,6 +578,15 @@ message ActionExecuted { // Only populated if success = false, and sometimes not even then. failure_details.FailureDetail failure_detail = 11; + + // Start of action execution, before any attempted execution begins. + google.protobuf.Timestamp start_time = 12; + + // End of action execution, after all attempted execution completes. + google.protobuf.Timestamp end_time = 13; + + // Additional details about action execution supplied by any/all strategies. + repeated google.protobuf.Any strategy_details = 14; } // Collection of all output files belonging to that output group.