add checkpoint token comparison · Entire

add checkpoint token comparison

19ca13e→main

Sessions

cea04e74bd49View transcript

Changes

2

4 unmodified lines

16 unmodified lines

229 unmodified lines

1856 unmodified lines

func newCheckpointTokensCmd() *cobra.Command { var jsonFlag bool var compareFlag string

cmd := &cobra.Command{ Use: "tokens ", } }

func runCheckpointTokens(ctx context.Context, cmd *cobra.Command, checkpointIDPrefix string, jsonOutput bool) error { cpID, lookup, err := resolveExplainCheckpointID(ctx, cmd.ErrOrStderr(), explainExportOptions{target: checkpointIDPrefix}) }

func writeCheckpointTokensJSON(w io.Writer, report checkpointTokensReport) error { enc := json.NewEncoder(w) enc.SetIndent("", " ") }

func buildCheckpointTokensComparison(target, baseline checkpointTokensReport) *checkpointTokensComparison { comparison := &checkpointTokensComparison{ BaselineCheckpointID: baseline.CheckpointID, TargetCheckpointID: target.CheckpointID, } }

func formatCheckpointMetricDelta(delta *checkpointTokensMetricDelta, formatValue func(int) string) string { if delta == nil { return "unavailable" } }