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

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


The following commit(s) were added to refs/heads/master by this push:
     new 022e63d  Add Off CPU eBPF Profiling query protocol (#89)
022e63d is described below

commit 022e63d476ebd2c24b05e4a1b8d816c0c5a4bca2
Author: mrproliu <[email protected]>
AuthorDate: Wed May 18 12:04:22 2022 +0800

    Add Off CPU eBPF Profiling query protocol (#89)
---
 ebpf-profiling.graphqls | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/ebpf-profiling.graphqls b/ebpf-profiling.graphqls
index 10c88e4..49e02c8 100644
--- a/ebpf-profiling.graphqls
+++ b/ebpf-profiling.graphqls
@@ -133,7 +133,20 @@ enum EBPFProfilingTriggerType {
 # relate with Linux function: 
https://man7.org/linux/man-pages/man2/perf_event_open.2.html
 enum EBPFProfilingTargetType {
     # Using "PERF_COUNT_SW_CPU_CLOCK" to profiling process with CPU clock
-    ON_CPU
+    ON_CPU,
+    # Using "finish_task_switch" of kprobe to profiling process
+    # relate with blog: https://www.brendangregg.com/offcpuanalysis.html
+    OFF_CPU
+}
+
+enum EBPFProfilingAnalyzeAggregateType {
+    # Aggregate by the total duration of stack
+    # For "OFF_CPU" target type of profiling: Statics the total time spent in 
off cpu.
+    DURATION,
+    # Aggregate by the trigger count
+    # For "ON_CPU" target type of profiling: Statics the number of dump count.
+    # For "OFF_CPU" target type of profiling: Statics the number of times the 
process is switched to off cpu by the scheduler.
+    COUNT
 }
 
 extend type Mutation {
@@ -149,5 +162,6 @@ extend type Query {
     # query schedules from profiling task
     queryEBPFProfilingSchedules(taskId: ID!): [EBPFProfilingSchedule!]!
     # analyze the profiling schedule
-    analysisEBPFProfilingResult(scheduleIdList: [ID!]!, timeRanges: 
[EBPFProfilingAnalyzeTimeRange!]!): EBPFProfilingAnalyzation!
+    # aggregateType is "EBPFProfilingAnalyzeAggregateType#COUNT" as default. 
+    analysisEBPFProfilingResult(scheduleIdList: [ID!]!, timeRanges: 
[EBPFProfilingAnalyzeTimeRange!]!, aggregateType: 
EBPFProfilingAnalyzeAggregateType): EBPFProfilingAnalyzation!
 }
\ No newline at end of file

Reply via email to