Skip to content

Commit

Permalink
perf: eliminate flamegraph merge (#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolesnikovae authored Jun 11, 2024
1 parent 1bd65d1 commit e178664
Show file tree
Hide file tree
Showing 11 changed files with 710 additions and 353 deletions.
715 changes: 411 additions & 304 deletions api/gen/proto/go/querier/v1/querier.pb.go

Large diffs are not rendered by default.

168 changes: 168 additions & 0 deletions api/gen/proto/go/querier/v1/querier_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions api/openapiv2/gen/phlare.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,15 @@
}
}
},
"v1ProfileFormat": {
"type": "string",
"enum": [
"PROFILE_FORMAT_UNSPECIFIED",
"PROFILE_FORMAT_FLAMEGRAPH",
"PROFILE_FORMAT_TREE"
],
"default": "PROFILE_FORMAT_UNSPECIFIED"
},
"v1ProfileSets": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1238,6 +1247,11 @@
"properties": {
"flamegraph": {
"$ref": "#/definitions/v1FlameGraph"
},
"tree": {
"type": "string",
"format": "byte",
"description": "Pyroscope tree bytes."
}
}
},
Expand All @@ -1264,6 +1278,10 @@
"type": "string",
"format": "int64",
"title": "Limit the nodes returned to only show the node with the max_node's biggest total"
},
"format": {
"$ref": "#/definitions/v1ProfileFormat",
"description": "Profile format specifies the format of profile to be returned.\nIf not specified, the profile will be returned in flame graph format."
}
}
},
Expand All @@ -1272,6 +1290,11 @@
"properties": {
"flamegraph": {
"$ref": "#/definitions/v1FlameGraph"
},
"tree": {
"type": "string",
"format": "byte",
"description": "Pyroscope tree bytes."
}
}
},
Expand Down
16 changes: 16 additions & 0 deletions api/querier/v1/querier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,21 @@ message SelectMergeStacktracesRequest {
int64 end = 4;
// Limit the nodes returned to only show the node with the max_node's biggest total
optional int64 max_nodes = 5;
// Profile format specifies the format of profile to be returned.
// If not specified, the profile will be returned in flame graph format.
ProfileFormat format = 6;
}

enum ProfileFormat {
PROFILE_FORMAT_UNSPECIFIED = 0;
PROFILE_FORMAT_FLAMEGRAPH = 1;
PROFILE_FORMAT_TREE = 2;
}

message SelectMergeStacktracesResponse {
FlameGraph flamegraph = 1;
// Pyroscope tree bytes.
bytes tree = 2;
}

message SelectMergeSpanProfileRequest {
Expand All @@ -84,10 +95,15 @@ message SelectMergeSpanProfileRequest {
int64 end = 5;
// Limit the nodes returned to only show the node with the max_node's biggest total
optional int64 max_nodes = 6;
// Profile format specifies the format of profile to be returned.
// If not specified, the profile will be returned in flame graph format.
ProfileFormat format = 7;
}

message SelectMergeSpanProfileResponse {
FlameGraph flamegraph = 1;
// Pyroscope tree bytes.
bytes tree = 2;
}

message DiffRequest {
Expand Down
Loading

0 comments on commit e178664

Please sign in to comment.