collect process metrics (#1051)
* collect process metrics * collect process metrics in a different goroutine
This commit is contained in:
parent
5bbfabde94
commit
385f3b3377
|
@ -10,10 +10,12 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/status-im/status-go/logutils"
|
"github.com/status-im/status-go/logutils"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/log"
|
"github.com/ethereum/go-ethereum/log"
|
||||||
|
gethmetrics "github.com/ethereum/go-ethereum/metrics"
|
||||||
"github.com/ethereum/go-ethereum/p2p/discv5"
|
"github.com/ethereum/go-ethereum/p2p/discv5"
|
||||||
"github.com/status-im/status-go/api"
|
"github.com/status-im/status-go/api"
|
||||||
"github.com/status-im/status-go/cmd/statusd/debug"
|
"github.com/status-im/status-go/cmd/statusd/debug"
|
||||||
|
@ -150,6 +152,7 @@ func main() {
|
||||||
// Run stats server.
|
// Run stats server.
|
||||||
if *metrics {
|
if *metrics {
|
||||||
go startCollectingNodeMetrics(interruptCh, backend.StatusNode())
|
go startCollectingNodeMetrics(interruptCh, backend.StatusNode())
|
||||||
|
go gethmetrics.CollectProcessMetrics(3 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync blockchain and stop.
|
// Sync blockchain and stop.
|
||||||
|
|
Loading…
Reference in New Issue