Skip to content

writeToFile fails after a full run if ./data does not exist #11

Description

@omerbek

Summary

The latency runner writes its final CSV files under ./data, but nothing creates that directory for native runs. The documented Docker flow hides this because the bind mount can create the host directory, but running the binary directly can complete the full transaction-sampling run and then fail at the final os.Create call.

Code path

main.go writes results with paths such as:

writeToFile(fmt.Sprintf("./data/flashblocks-%s.csv", region), flashblockTimings)
writeToFile(fmt.Sprintf("./data/base-%s.csv", region), baseTimings)

writeToFile currently calls os.Create(filename) directly, so a missing parent directory causes open ./data/...: no such file or directory.

Expected behavior

The runner should create the output directory before writing CSV results so a native run does not discard all collected samples at the very end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions