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

Calls between non-focused funcs are not shown #4

Closed
ondrajz opened this issue Jan 13, 2017 · 2 comments
Closed

Calls between non-focused funcs are not shown #4

ondrajz opened this issue Jan 13, 2017 · 2 comments

Comments

@ondrajz
Copy link
Owner

ondrajz commented Jan 13, 2017

Currently only calls to or from focused package are shown. However in cases when the results two contain functions which are both outside focused package and shown because focused package has some calls from/to both. Calls between such functions should be shown since both functions are already in the result anyway.

Example code

package main

import (
    "fmt"

    "golang.org/x/sync/errgroup"
)

func main() {
    var g errgroup.Group
    g.Go(func() error {
        fmt.Println("Hello world")
        return nil
    })
    g.Wait()
}

Result

result

You can see that main calls (*Group).Go and (*Group).Go$1 calls main$1. However the call between those two funcs inside errgroup is not shown even though both are in the result already.

By showing such calls the results would make clearer results by showing complete call path from the main to the fmt.Println.

Thanks @DmitriyMV for reporting this issue!

@DmitriyMV
Copy link

This is actually rather important, because there are libraries who are calling you back in the new goroutines. I'm looking forward to it 😃

@ondrajz
Copy link
Owner Author

ondrajz commented Jan 25, 2017

Fixed in v0.3.4.

Output for the above code looks like this now:
already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants