erigon-pulse/cmd/state/commands/index_stats.go

25 lines
521 B
Go
Raw Normal View History

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 = ""
}
2020-08-10 23:55:32 +00:00
return stats.IndexStats(chaindata, indexBucket, statsfile)
},
}