chanfitness: Add channel event log structure
This commit adds a chanfitness package which will be used to track channel health and performance metrics. It adds a channel event structure which will be used to track channel opens/closes and peer uptime. The eventLog implements an uptime function which calcualtes uptime over a given period and a lifespan function which returns the time when the log began monitoring the channel and, if the channel is closed, the time when it stopped moitoring it.
This commit is contained in:
1 parent
fe597b6310
commit
744876003d
4 files changed
+647
No files matched your search
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/lightningnetwork/lnd/build"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/chanbackup"
|
||||
"github.com/lightningnetwork/lnd/chanfitness"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channelnotifier"
|
||||
"github.com/lightningnetwork/lnd/contractcourt"
|
||||
@@ -98,6 +99,7 @@ func init() {
|
||||
|
||||
addSubLogger(routerrpc.Subsystem, routerrpc.UseLogger)
|
||||
addSubLogger(wtclientrpc.Subsystem, wtclientrpc.UseLogger)
|
||||
addSubLogger(chanfitness.Subsystem, chanfitness.UseLogger)
|
||||
}
|
||||
|
||||
// addSubLogger is a helper method to conveniently create and register the
|
||||
|
||||
Reference in new issue
Block a user