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

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


The following commit(s) were added to refs/heads/master by this push:
     new 28eb37d  fix: add missing colde stage assignments (#221)
28eb37d is described below

commit 28eb37d99d46ed997464b71046b95c90fb5aff54
Author: kezhenxu94 <[email protected]>
AuthorDate: Mon May 19 10:57:09 2025 +0800

    fix: add missing colde stage assignments (#221)
---
 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 {

Reply via email to