Skip to content

Commit

Permalink
fix thread state parser for async-profiler 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tomershafir committed Feb 11, 2024
1 parent 07da0ba commit cefc6be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func (ch *clickhouseAccessNativeColumnar) InsertBatch(ls plog.Logs) error {
zap.String(columnServiceName, service_name[i]),
zap.String(columnPeriodType, period_type[i]),
zap.String(columnPeriodUnit, period_unit[i]),
zap.Any(columnSampleTypesUnits, sample_types_units[i]),
zap.String(columnPayloadType, payload_type[i]),
)
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/pyroscopereceiver/jfrparser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (pa *jfrPprofParser) Parse(jfr *bytes.Buffer, md profile_types.Metadata) ([
case pa.jfrParser.TypeMap.T_EXECUTION_SAMPLE:
values[0] = 1 * int64(period)
ts := pa.jfrParser.GetThreadState(pa.jfrParser.ExecutionSample.State)
if ts != nil && ts.Name == "STATE_RUNNABLE" {
if ts != nil && ts.Name != "STATE_SLEEPING" {
pa.addStacktrace(sampleTypeCpu, pa.jfrParser.ExecutionSample.StackTrace, values[:1])
}
// TODO: this code is from github/grafana/pyroscope, need to validate that the qryn.js query simulator handles this branch as expected for wall
Expand Down

0 comments on commit cefc6be

Please sign in to comment.