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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Release Notes.
- Add the sub-command `process estimate scale` to estimate the process scale.(#142)
- Update the `process list` to must be provided the instance and duration.(#144)
- Remove `layer` field in the `instance` and `process` commands for 9.1.0 GraphQL query protocol's breaking changes (#149)
- Remove `duration` flag in `profiling ebpf schedules`.(#150)

0.10.0
------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# specific language governing permissions and limitations
# under the License.

query ($taskID: ID!, $duration: Duration!){
result: queryEBPFProfilingSchedules(taskId: $taskID, duration: $duration) {
query ($taskID: ID!){
result: queryEBPFProfilingSchedules(taskId: $taskID) {
scheduleId
taskId
startTime
Expand All @@ -28,7 +28,6 @@ query ($taskID: ID!, $duration: Duration!){
serviceName
instanceId
instanceName
layer
agentId
detectType
labels
Expand Down
17 changes: 1 addition & 16 deletions internal/commands/profiling/ebpf/schedules.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
package ebpf

import (
api "skywalking.apache.org/repo/goapi/query"

"github.com/urfave/cli/v2"

"github.com/apache/skywalking-cli/internal/commands/interceptor"
"github.com/apache/skywalking-cli/internal/flags"
"github.com/apache/skywalking-cli/internal/model"
"github.com/apache/skywalking-cli/pkg/display"
"github.com/apache/skywalking-cli/pkg/display/displayable"
"github.com/apache/skywalking-cli/pkg/graphql/profiling"
Expand All @@ -41,7 +37,6 @@ Example:
$ swctl profiling ebpf schedules --task-id=abc
`,
Flags: flags.Flags(
flags.DurationFlags,
[]cli.Flag{
&cli.StringFlag{
Name: "task-id",
Expand All @@ -50,20 +45,10 @@ $ swctl profiling ebpf schedules --task-id=abc
},
},
),
Before: interceptor.BeforeChain(
interceptor.DurationInterceptor,
),
Action: func(ctx *cli.Context) error {
taskID := ctx.String("task-id")
start := ctx.String("start")
end := ctx.String("end")
step := ctx.Generic("step")

schedules, err := profiling.QueryEBPFProfilingScheduleList(ctx, taskID, &api.Duration{
Start: start,
End: end,
Step: step.(*model.StepEnumValue).Selected,
})
schedules, err := profiling.QueryEBPFProfilingScheduleList(ctx, taskID)
if err != nil {
return err
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/graphql/profiling/ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ func QueryEBPFProfilingTaskList(ctx *cli.Context, serviceID string) ([]*api.EBPF
return response["result"], err
}

func QueryEBPFProfilingScheduleList(ctx *cli.Context, taskID string,
duration *api.Duration) ([]*api.EBPFProfilingSchedule, error) {
func QueryEBPFProfilingScheduleList(ctx *cli.Context, taskID string) ([]*api.EBPFProfilingSchedule, error) {
var response map[string][]*api.EBPFProfilingSchedule

request := graphql.NewRequest(assets.Read("graphqls/profiling/ebpf/QueryEBPFProfilingScheduleList.graphql"))
request.Var("taskID", taskID)
request.Var("duration", duration)

err := client.ExecuteQuery(ctx, request, &response)

Expand Down