Skip to content

test: add benchmark suite for scan and export commands #46

Description

@mendsec

Context

catnet currently has no benchmark tests. Because catnet is a thin wrapper, the relevant benchmark is end-to-end CLI invocation latency (binary startup + scan of localhost + JSON export). Establish a baseline so regressions introduced by new flags or middleware are detectable in CI.

Acceptance criteria

  • BenchmarkScanLocalhost measures full StartScan of 127.0.0.1 with ports 80,443 via the engine directly (not subprocess)
  • BenchmarkExportJSON measures ExportJSON of a 1000-device ScanReport (mirrors catnet-core benchmark for comparison)
  • go test -bench=. -benchmem ./... runs without error in CI
  • Baseline numbers documented in docs/performance.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTesting-related

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions