Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanmar511 committed Jul 19, 2018
1 parent 68e5354 commit 12208ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type Options struct {
// Generate generates a report as directed by the Report.
func Generate(w io.Writer, rpt *Report, obj plugin.ObjTool, ui plugin.UI) error {
if rpt.unexpNegSamples {
ui.PrintErr("Profile has negative sample values.\nIf using the -base flag to compare profiles, consider using the -diff_base flag instead.")
ui.PrintErr("Profile has negative values, percentage values may be incorrect. If using -base, consider using -diff_base instead.")
}

o := rpt.options
Expand Down Expand Up @@ -1254,7 +1254,7 @@ func computeTotal(prof *profile.Profile, value, meanDiv func(v []int64) int64) (
if diffTotal > 0 {
total = diffTotal
div = diffDiv
// negative samples are expected in diff base profiles.
// Negative samples are expected in diff base profiles.
negSamples = false
}
if div != 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestSource(t *testing.T) {
var b bytes.Buffer
ui := &proftest.TestUI{T: t}
if tc.wantNegSampleErr {
ui.AllowRx = "Profile has negative sample values.\nIf using the -base flag to compare profiles, consider using the -diff_base flag instead."
ui.AllowRx = "Profile has negative values, percentage values may be incorrect. If using -base, consider using -diff_base instead."
}
if err := Generate(&b, tc.rpt, &binutils.Binutils{}, ui); err != nil {
t.Fatalf("%s: %v", tc.want, err)
Expand Down

0 comments on commit 12208ab

Please sign in to comment.