JuliusBrussee/caveman · error

cachebench: -trace-in cannot be combined with -corpus

Error message

cachebench: -trace-in cannot be combined with -corpus

What it means

Error "cachebench: -trace-in cannot be combined with -corpus" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cmd/cachebench/main.go:60

		corpusMaxBytes  = flag.Int64("corpus-max-bytes", 1<<30, "fail closed above this many retained corpus bytes")
	)
	flag.Parse()
	target := cachebench.Target{RequestHitRate: *targetRate, TokenHitRate: *targetRate, MinEligibleRequest: *minRequests}
	var (
		report cachebench.Report
		err    error
	)
	if *observations != "" && *corpusPath != "" {
		fatal(fmt.Errorf("cachebench: -observations and -corpus are mutually exclusive"))
	}
	if *observations != "" {
		if *traceIn == "" {
			fatal(fmt.Errorf("cachebench: -trace-in required with -observations"))
		}
		report, err = observedReport(*observations, *traceIn, target)
	} else if *corpusPath != "" {
		if *traceIn != "" {
			fatal(fmt.Errorf("cachebench: -trace-in cannot be combined with -corpus"))
		}
		providers, providerErr := selectProviders(*providerList)
		if providerErr != nil {
			fatal(providerErr)
		}
		report, err = corpusReport(*corpusPath, *corpusFormat, cachebench.CorpusMetadata{
			Name: *corpusName, License: *corpusLicense, Revision: *corpusRevision,
		}, cachebench.CorpusLimits{
			MaxRows: *corpusMaxRows, MaxSessions: *corpusMaxSess, MaxRetainedBytes: *corpusMaxBytes,
		}, providers, target, *traceOut)
	} else {
		scenario := cachebench.DefaultScenario()
		scenario.Turns = *turns
		scenario.CompactionEvery = *compaction
		scenario.Step = *step
		scenario.AssumedTTL = *assumedTTL
		scenario.StaticTokens = *staticTokens
		scenario.UserTokens = *userTokens

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Do not combine -trace-in with -corpus.

When it happens

Trigger: Thrown at cacheengine/cmd/cachebench/main.go:60 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/f939c06cf920997d. Report an issue: GitHub.