Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Release frame drop issue #329

Merged
merged 2 commits into from
Oct 2, 2023
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Features**

- Return the first and deepest issue detected. ([#317](https://github.com/getsentry/vroom/pull/317))
- Release frame drop issue detection. ([#329](https://github.com/getsentry/vroom/pull/329))

**Bug Fixes**

Expand Down
14 changes: 11 additions & 3 deletions internal/occurrence/occurrence.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const (
JSONDecodeType Type = 2003
RegexType Type = 2007
ViewType Type = 2006
FrameDropType Type = 2008
FrameDropType Type = 2009
FrameRegressionExpType Type = 2010

EvidenceNameDuration EvidenceName = "Duration"
Expand Down Expand Up @@ -197,7 +197,11 @@ func NewOccurrence(p profile.Profile, ni nodeInfo) *Occurrence {
}
}

func FromRegressedFunction(p profile.Profile, regressed RegressedFunction, f frame.Frame) *Occurrence {
func FromRegressedFunction(
p profile.Profile,
regressed RegressedFunction,
f frame.Frame,
) *Occurrence {
pf := p.Platform()

switch pf {
Expand All @@ -210,7 +214,11 @@ func FromRegressedFunction(p profile.Profile, regressed RegressedFunction, f fra
fingerprint := fmt.Sprintf("%x", regressed.Fingerprint)
beforeP95 := time.Duration(regressed.AggregateRange1).Round(10 * time.Microsecond)
afterP95 := time.Duration(regressed.AggregateRange2).Round(10 * time.Microsecond)
regressionText := fmt.Sprintf("P95 function duration increased from %s to %s.", beforeP95, afterP95)
regressionText := fmt.Sprintf(
"P95 function duration increased from %s to %s.",
beforeP95,
afterP95,
)

return &Occurrence{
Culprit: fullyQualifiedName,
Expand Down