Skip to content

Commit

Permalink
Merge pull request bnb-chain#6 from flywukong/IO-metrics
Browse files Browse the repository at this point in the history
fix comments second
  • Loading branch information
forcodedancing authored Feb 25, 2022
2 parents 3989be3 + 1d4ce16 commit c467683
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
6 changes: 2 additions & 4 deletions cachemetrics/get_gid.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ func IsMinerMainRoutineID(id int64) bool {
}

func UpdateSyncingRoutineID(id int64) {
if SyncingRoutineId != id {
SyncingRoutineId = id
}
atomic.StoreInt64(&SyncingRoutineId, id)
}

// judge if it is main process of syncing
func IsSyncMainRoutineID(id int64) bool {
if id == SyncingRoutineId {
if id == atomic.LoadInt64(&SyncingRoutineId) {
return true
}
return false
Expand Down
2 changes: 0 additions & 2 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ var (
metricsFlags = []cli.Flag{
utils.MetricsEnabledFlag,
utils.MetricsEnabledExpensiveFlag,
utils.MetricsEnabledRecordIOFlag,
utils.MetricsDisablePrefetchFlag,
utils.MetricsHTTPFlag,
utils.MetricsPortFlag,
utils.MetricsEnableInfluxDBFlag,
Expand Down
8 changes: 0 additions & 8 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,14 +744,6 @@ var (
Name: "metrics.expensive",
Usage: "Enable expensive metrics collection and reporting",
}
MetricsDisablePrefetchFlag = cli.BoolFlag{
Name: "metrics.noprefetch",
Usage: "disable prefetch when metrics collecting",
}
MetricsEnabledRecordIOFlag = cli.BoolFlag{
Name: "metrics.iorecord",
Usage: "Enable recording io metrics",
}

// MetricsHTTPFlag defines the endpoint for a stand-alone metrics HTTP endpoint.
// Since the pprof service enables sensitive/vulnerable behavior, this allows a user
Expand Down

0 comments on commit c467683

Please sign in to comment.