MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / writeCurrentSummary

Function writeCurrentSummary

tests/loadtest/tools/queue_benchmark.go:523–535  ·  view source on GitHub ↗
(cfg benchmarkConfig, start, end snapshot, samples []snapshot)

Source from the content-addressed store, hash-verified

521}
522
523func writeCurrentSummary(cfg benchmarkConfig, start, end snapshot, samples []snapshot) error {
524 summary := buildSummary(cfg, start, end, samples)
525 if err := os.MkdirAll(filepath.Dir(cfg.outPath), 0o755); err != nil {
526 return err
527 }
528
529 data, err := json.MarshalIndent(summary, "", " ")
530 if err != nil {
531 return err
532 }
533
534 return os.WriteFile(cfg.outPath, data, 0o644)
535}
536
537func waitForNextTickOrInterrupt(ticker *time.Ticker, signalCh <-chan os.Signal) bool {
538 select {

Callers 1

mainFunction · 0.85

Calls 1

buildSummaryFunction · 0.85

Tested by

no test coverage detected