(prof *profile.Profile, cfg config)
| 251 | } |
| 252 | |
| 253 | func aggregate(prof *profile.Profile, cfg config) error { |
| 254 | var function, filename, linenumber, address bool |
| 255 | inlines := !cfg.NoInlines |
| 256 | switch cfg.Granularity { |
| 257 | case "": |
| 258 | function = true // Default granularity is "functions" |
| 259 | case "addresses": |
| 260 | if inlines { |
| 261 | return nil |
| 262 | } |
| 263 | function = true |
| 264 | filename = true |
| 265 | linenumber = true |
| 266 | address = true |
| 267 | case "lines": |
| 268 | function = true |
| 269 | filename = true |
| 270 | linenumber = true |
| 271 | case "files": |
| 272 | filename = true |
| 273 | case "functions": |
| 274 | function = true |
| 275 | case "filefunctions": |
| 276 | function = true |
| 277 | filename = true |
| 278 | default: |
| 279 | return fmt.Errorf("unexpected granularity") |
| 280 | } |
| 281 | return prof.Aggregate(inlines, function, filename, linenumber, cfg.ShowColumns, address) |
| 282 | } |
| 283 | |
| 284 | func reportOptions(p *profile.Profile, numLabelUnits map[string]string, cfg config) (*report.Options, error) { |
| 285 | si, mean := cfg.SampleIndex, cfg.Mean |
no test coverage detected
searching dependent graphs…