Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Jan 5, 2024
2 parents 82c4b29 + a46189c commit b43995d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions turbo/app/snapshots_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ var snapshotCommand = cli.Command{
&cli.PathFlag{Name: "dst", Required: true},
}),
},
{
Name: "meta",
Action: doMeta,
Flags: joinFlags([]cli.Flag{
&cli.PathFlag{Name: "src", Required: true},
}),
},
{
Name: "debug",
Action: doDebugKey,
Expand Down Expand Up @@ -391,6 +398,17 @@ func doDiff(cliCtx *cli.Context) error {
return nil
}

func doMeta(cliCtx *cli.Context) error {
srcF := cliCtx.String("src")
src, err := compress.NewDecompressor(srcF)
if err != nil {
return err
}
defer src.Close()
log.Info("meta", "count", src.Count(), "size", src.Size(), "name", src.FileName())
return nil
}

func doDecompressSpeed(cliCtx *cli.Context) error {
logger, _, err := debug.Setup(cliCtx, true /* rootLogger */)
if err != nil {
Expand Down

0 comments on commit b43995d

Please sign in to comment.