diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index da39b259..73b888da 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -2068,6 +2068,13 @@ message ExecutionResult { TriggerSubscriptionRequest trigger_subscriptions = 3; Restrictions restrictions = 4; } + // compute_duration_ms is the wall-clock duration of the workflow run in + // milliseconds, as measured by the module that executed it: the guest run + // for the WASM host, the enclave-reported duration for confidential + // workflows. The host sets it after the run and the engine meters it as + // compute (cre:workflow:compute). Presence distinguishes an unavailable + // measurement from a measured zero. + optional int64 compute_duration_ms = 5; } message GetSecretsRequest { diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index d435aea2..841322af 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -1449,9 +1449,16 @@ type ExecutionResult struct { // *ExecutionResult_Error // *ExecutionResult_TriggerSubscriptions // *ExecutionResult_Restrictions - Result isExecutionResult_Result `protobuf_oneof:"result"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Result isExecutionResult_Result `protobuf_oneof:"result"` + // compute_duration_ms is the wall-clock duration of the workflow run in + // milliseconds, as measured by the module that executed it: the guest run + // for the WASM host, the enclave-reported duration for confidential + // workflows. The host sets it after the run and the engine meters it as + // compute (cre:workflow:compute). Presence distinguishes an unavailable + // measurement from a measured zero. + ComputeDurationMs *int64 `protobuf:"varint,5,opt,name=compute_duration_ms,json=computeDurationMs,proto3,oneof" json:"compute_duration_ms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutionResult) Reset() { @@ -1527,6 +1534,13 @@ func (x *ExecutionResult) GetRestrictions() *Restrictions { return nil } +func (x *ExecutionResult) GetComputeDurationMs() int64 { + if x != nil && x.ComputeDurationMs != nil { + return *x.ComputeDurationMs + } + return 0 +} + type isExecutionResult_Result interface { isExecutionResult_Result() } @@ -2528,13 +2542,15 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\bpre_hook\x18\x05 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\apreHook\x12*\n" + "\x11max_response_size\x18\x04 \x01(\x04R\x0fmaxResponseSize\x12(\n" + "\x10suspend_on_await\x18\x06 \x01(\bR\x0esuspendOnAwaitB\t\n" + - "\arequest\"\xfe\x01\n" + + "\arequest\"\xcb\x02\n" + "\x0fExecutionResult\x12(\n" + "\x05value\x18\x01 \x01(\v2\x10.values.v1.ValueH\x00R\x05value\x12\x16\n" + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12^\n" + "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptions\x12?\n" + - "\frestrictions\x18\x04 \x01(\v2\x19.sdk.v1alpha.RestrictionsH\x00R\frestrictionsB\b\n" + - "\x06result\"l\n" + + "\frestrictions\x18\x04 \x01(\v2\x19.sdk.v1alpha.RestrictionsH\x00R\frestrictions\x123\n" + + "\x13compute_duration_ms\x18\x05 \x01(\x03H\x01R\x11computeDurationMs\x88\x01\x01B\b\n" + + "\x06resultB\x16\n" + + "\x14_compute_duration_ms\"l\n" + "\x11GetSecretsRequest\x126\n" + "\brequests\x18\x01 \x03(\v2\x1a.sdk.v1alpha.SecretRequestR\brequests\x12\x1f\n" + "\vcallback_id\x18\x02 \x01(\x05R\n" + diff --git a/cre/sdk/v1alpha/sdk.proto b/cre/sdk/v1alpha/sdk.proto index 0a562a17..281dbecf 100644 --- a/cre/sdk/v1alpha/sdk.proto +++ b/cre/sdk/v1alpha/sdk.proto @@ -146,6 +146,13 @@ message ExecutionResult { TriggerSubscriptionRequest trigger_subscriptions = 3; Restrictions restrictions = 4; } + // compute_duration_ms is the wall-clock duration of the workflow run in + // milliseconds, as measured by the module that executed it: the guest run + // for the WASM host, the enclave-reported duration for confidential + // workflows. The host sets it after the run and the engine meters it as + // compute (cre:workflow:compute). Presence distinguishes an unavailable + // measurement from a measured zero. + optional int64 compute_duration_ms = 5; } message GetSecretsRequest {