diff --git a/cmd/lotus-shed/snapshot.go b/cmd/lotus-shed/snapshot.go deleted file mode 100644 index 3ac3319d8..000000000 --- a/cmd/lotus-shed/snapshot.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "github.com/urfave/cli/v2" -) - -var snapshotCmd = &cli.Command{ - Name: "snapshot", - Description: "interact with filecoin chain snapshots", - Subcommands: []*cli.Command{ - snapshotStatCmd, - }, -} - -var snapshotStatCmd = &cli.Command{ - Name: "stat-actor", - Usage: "display number of snapshot bytes held by provided actor", - ArgsUsage: "[datastore path] [head] [actor address]", - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: "field", // specify top level actor field to stat - }, - }, - Action: func(cctx *cli.Context) error { - // Initialize in memory graph counter - // Get root tskey - // Walk headers back - - // Count header bytes - // open state, - // if no field set graph count actor HEAD - // if field is set, parse actor head, look for field - // if field not found or not a cid error, otherwise do graph count on the cid - - // Print out stats - - return nil - }, -} diff --git a/cmd/lotus-shed/stateroot-stats.go b/cmd/lotus-shed/stateroot-stats.go index bec37d71f..16dfc5935 100644 --- a/cmd/lotus-shed/stateroot-stats.go +++ b/cmd/lotus-shed/stateroot-stats.go @@ -104,34 +104,6 @@ type statItem struct { Stat api.ObjStat } -// var snapShotStatCmd = &cli.Command{ -// Name: "snapshot-stat", -// Usage: "print statistics of the snapshot rooted at given block", -// Flags: []cli.Flag{ -// &cli.StringFlag{ -// Name: "tipset", -// Usage: "specify tipset to start from", -// }, -// }, -// Action: func(cctx *cli.Context) error { -// api, closer, err := lcli.GetFullNodeAPI(cctx) -// if err != nil { -// return err -// } - -// defer closer() -// ctx := lcli.ReqContext(cctx) - -// ts, err := lcli.LoadTipSet(ctx, cctx, api) -// if err != nil { -// return err -// } - -// api.ChainStatSnapshot(ctx, ts.Key()) - -// }, -// } - var staterootStatCmd = &cli.Command{ Name: "stat", Usage: "print statistics for the stateroot of a given block", diff --git a/scripts/snapshot-summary.py b/scripts/snapshot-summary.py index fd64da64f..b06e79a01 100644 --- a/scripts/snapshot-summary.py +++ b/scripts/snapshot-summary.py @@ -4,9 +4,10 @@ import pathlib snapshot_data = json.load(sys.stdin) -# XXX: parameterize to use block count as value instead of byte size -# XXX: parameterize on different types of px chart types -# XXX: parameterize on output port so we can serve this from infra +# Possible extensions: +# 1. parameterize to use block count as value instead of byte size +# 2. parameterize on different types of px chart types +# 3. parameterize on output port so we can serve this from infra parents = [] names = []