Skip to content

MediaApp: expand benchmarking to cover full pipeline timing #20

Description

@N0153128

Benchmarking currently tracks single-file processing time only. Need visibility into the full pipeline broken down by phase.

Requested changes

Three timing phases to track:

  1. Core processing — startup time covering OpenCV load, plugin registration, CLI parsing (tracked in Main)
  2. Per-file overhead — time spent in MediaApp before processor.process() is called: MIME detection, plugin resolution, context population, validation
  3. Plugin processing — time spent inside processor.process() only

Reporting:

  • Per-file breakdown logged after each file when benchmarking is enabled
  • Running average updated after each file in a batch
  • Final average printed after all files are processed

Implementation notes

  • Core startup time: capture Instant before plugins.registerAll() and after cli.execute() returns in Main
  • Per-file overhead vs plugin time: capture Instant before and after processor.process() call inside processFile() — delta between total file time and plugin time gives overhead
  • Average tracking: keep a running total and file count in MediaApp, expose a summary method called after the loop in DisarmCLI

Acceptance criteria

  • Core startup timing captured in Main
  • Per-file overhead and plugin processing time tracked separately in MediaApp
  • Running average maintained across multiple files
  • Summary printed after batch completes
  • All output gated behind globalConfig.getBenchmarking()

Metadata

Metadata

Assignees

Labels

dev-pluginplugin-based architecture branchenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions