Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions internal/commands/metrics/expression/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions internal/commands/profiling/asyncprofiler/getTaskList.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading