Skip to content

Commit

Permalink
[ws-mananger-api, -mk2] Emit new field .Status.InitializerMetrics
Browse files Browse the repository at this point in the history
Tool: gitpod/catfood.gitpod.cloud
  • Loading branch information
geropl committed Feb 18, 2025
1 parent 00d3b82 commit fb6c6d7
Show file tree
Hide file tree
Showing 9 changed files with 1,546 additions and 441 deletions.
34 changes: 34 additions & 0 deletions components/ws-manager-api/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option go_package = "github.com/gitpod-io/gitpod/ws-manager/api";

import "content-service-api/initializer.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";

service WorkspaceManager {
// getWorkspaces produces a list of running workspaces and their status
Expand Down Expand Up @@ -321,6 +322,9 @@ message WorkspaceStatus {

// auth provides authentication information about the workspace. This info is primarily used by ws-proxy.
WorkspaceAuthentication auth = 9;

// metrics contains metrics about the workspace
InitializerMetrics initializer_metrics = 11;
}

// IDEImage configures the IDE images a workspace will use
Expand Down Expand Up @@ -757,3 +761,33 @@ message WorkspaceClass {
// The cost of running a workspace of this class per minute expressed in credits
float credits_per_minute = 4;
}

// Add these new message definitions
message InitializerMetric {
// Duration in nanoseconds (standard protobuf duration)
google.protobuf.Duration duration = 1;

// Size in bytes
uint64 size = 2;
}

message InitializerMetrics {
// Git contains metrics for the git initializer step
InitializerMetric git = 1;

// FileDownload contains metrics for the file download initializer step
InitializerMetric file_download = 2;

// Snapshot contains metrics for the snapshot initializer step
// This used for workspaces started from snapshots.
InitializerMetric snapshot = 3;

// Backup contains metrics for the backup initializer step
InitializerMetric backup = 4;

// Prebuild contains metrics for the prebuild initializer step
InitializerMetric prebuild = 5;

// Composite contains metrics for the composite initializer step
InitializerMetric composite = 6;
}
1,098 changes: 665 additions & 433 deletions components/ws-manager-api/go/core.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/ws-manager-api/go/core_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/ws-manager-api/go/mock/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion components/ws-manager-api/typescript/src/core_grpc_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion components/ws-manager-api/typescript/src/core_grpc_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 87 additions & 1 deletion components/ws-manager-api/typescript/src/core_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb6c6d7

Please sign in to comment.