erigon-pulse/cmd/state/commands/index_stats.go
battlmonstr e6c056e666
Rename Datadir/dataDir to follow conventions. (#3576)
* rename from Datadir to DataDir (functions and public vars)
* rename dataDir to datadir (local variables)
2022-02-22 17:39:48 +00:00

25 lines
521 B
Go

package commands
import (
"github.com/ledgerwatch/erigon/cmd/state/stats"
"github.com/spf13/cobra"
)
func init() {
withDataDir(indexStatsCmd)
withStatsfile(indexStatsCmd)
withIndexBucket(indexStatsCmd)
rootCmd.AddCommand(indexStatsCmd)
}
var indexStatsCmd = &cobra.Command{
Use: "indexStats",
Short: "Stats about index chunks",
RunE: func(cmd *cobra.Command, args []string) error {
if statsfile == "stateless.csv" {
statsfile = ""
}
return stats.IndexStats(chaindata, indexBucket, statsfile)
},
}