You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2025/05/19 02:44:37 UTC

(skywalking-cli) 01/01: fix: add missing colde stage assignments

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch cold
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git

commit ca68c286c68a5861d1cff2aff7bc70e7dd1371ae
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon May 19 10:44:19 2025 +0800

    fix: add missing colde stage assignments
---
 internal/commands/metrics/expression/exec.go             | 8 +++++---
 internal/commands/profiling/asyncprofiler/getTaskList.go | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/internal/commands/metrics/expression/exec.go b/internal/commands/metrics/expression/exec.go
index a40724e..2a9b61f 100644
--- a/internal/commands/metrics/expression/exec.go
+++ b/internal/commands/metrics/expression/exec.go
@@ -64,6 +64,7 @@ $ swctl metrics execute --expression="service_resp_time" --service-name business
 		end := ctx.String("end")
 		start := ctx.String("start")
 		step := ctx.Generic("step")
+		cold := ctx.Bool("cold")
 
 		expression := ctx.String(expressionParameterName)
 		entity, err := interceptor.ParseEntity(ctx)
@@ -72,9 +73,10 @@ $ swctl metrics execute --expression="service_resp_time" --service-name business
 		}
 
 		duration := api.Duration{
-			Start: start,
-			End:   end,
-			Step:  step.(*model.StepEnumValue).Selected,
+			Start:     start,
+			End:       end,
+			Step:      step.(*model.StepEnumValue).Selected,
+			ColdStage: &cold,
 		}
 
 		result, err := metrics.Execute(ctx.Context, expression, entity, duration)
diff --git a/internal/commands/profiling/asyncprofiler/getTaskList.go b/internal/commands/profiling/asyncprofiler/getTaskList.go
index 157b7ed..eec5cb0 100644
--- a/internal/commands/profiling/asyncprofiler/getTaskList.go
+++ b/internal/commands/profiling/asyncprofiler/getTaskList.go
@@ -57,10 +57,12 @@ $ swctl profiling async list --service-name=service-name`,
 		start := ctx.String("start")
 		end := ctx.String("end")
 		step := ctx.Generic("step")
+		cold := ctx.Bool("cold")
 		duration := query.Duration{
-			Start: start,
-			End:   end,
-			Step:  step.(*model.StepEnumValue).Selected,
+			Start:     start,
+			End:       end,
+			Step:      step.(*model.StepEnumValue).Selected,
+			ColdStage: &cold,
 		}
 		var limit *int
 		if limitArg := ctx.Int("limit"); limitArg != 0 {