erigon-pulse/cmd/state/commands/index_stats.go
b00ris a9f71298aa
Index chunking (#473)
* index generation

* save state

* save state

* save state

* save state

* save state

* save state

* save state

* save state

* fix

* save state

* fix
2020-04-20 11:35:33 +01:00

25 lines
535 B
Go

package commands
import (
"github.com/ledgerwatch/turbo-geth/cmd/state/stats"
"github.com/spf13/cobra"
)
func init() {
withChaindata(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, []byte(indexBucket), statsfile)
},
}