mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-29 07:07:16 +00:00
25 lines
525 B
Go
25 lines
525 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/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)
|
|
},
|
|
}
|