-
Notifications
You must be signed in to change notification settings - Fork 612
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
add -diff flag for better profile comparision #369
Changes from 14 commits
5a69374
b20456b
190ce18
ebd76df
92f6fbe
6921532
14703a0
49ff346
f486417
bd80566
79b3df8
ee3be39
562c51d
4b9834b
9558b3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,7 +288,7 @@ type testFlags struct { | |
floats map[string]float64 | ||
strings map[string]string | ||
args []string | ||
stringLists map[string][]*string | ||
stringLists map[string][]string | ||
} | ||
|
||
func (testFlags) ExtraUsage() string { return "" } | ||
|
@@ -355,7 +355,12 @@ func (f testFlags) StringVar(p *string, s, d, c string) { | |
|
||
func (f testFlags) StringList(s, d, c string) *[]*string { | ||
if t, ok := f.stringLists[s]; ok { | ||
return &t | ||
// convert slice of strings to slice of string pointers before returning. | ||
tp := make([]*string, len(t)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change? It's not obvious, a comment would be useful. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was to address a previous comment for simplifying testing. Added a comment. |
||
for i, v := range t { | ||
tp[i] = &v | ||
} | ||
return &tp | ||
} | ||
return &[]*string{} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a bit strange that "Comparing profiles" is a section under "Fetching profiles", is it intentional? I'd expect it to be more related to viewing than to fetching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Moved.