lntest: add flag -goroutinedump
This commit is contained in:
parent
8d5430dae3
commit
195a868455
@ -652,6 +652,11 @@ func (n *NetworkHarness) StopNode(node *HarnessNode) error {
|
||||
// SaveProfilesPages hits profiles pages of all active nodes and writes it to
|
||||
// disk using a similar naming scheme as to the regular set of logs.
|
||||
func (n *NetworkHarness) SaveProfilesPages() {
|
||||
// Only write gorutine dumps if flag is active.
|
||||
if !(*goroutineDump) {
|
||||
return
|
||||
}
|
||||
|
||||
for _, node := range n.activeNodes {
|
||||
if err := saveProfilesPage(node); err != nil {
|
||||
fmt.Println(err)
|
||||
|
@ -80,7 +80,12 @@ var (
|
||||
// logOutput is a flag that can be set to append the output from the
|
||||
// seed nodes to log files.
|
||||
logOutput = flag.Bool("logoutput", false,
|
||||
"log output from node n to file outputn.log")
|
||||
"log output from node n to file output-n.log")
|
||||
|
||||
// goroutineDump is a flag that can be set to dump the active
|
||||
// goroutines of test nodes on failure.
|
||||
goroutineDump = flag.Bool("goroutinedump", false,
|
||||
"write goroutine dump from node n to file pprof-n.log")
|
||||
)
|
||||
|
||||
// generateListeningPorts returns three ints representing ports to listen on
|
||||
|
Loading…
Reference in New Issue
Block a user