Skip to content

test: add performance testing tool for concurrent imports #15

@kojiromike

Description

@kojiromike

Summary

Add a performance testing tool to validate concurrent vocabulary imports across multiple OpenEMR sites.

Background

The CLI supports database locking to prevent concurrent imports to the same site. We need a way to test:

  • Concurrent imports to different sites work correctly in parallel
  • Lock contention behaves as expected when multiple processes target the same site
  • Performance characteristics under load

Tasks

  • Create Docker Compose configuration for multiple OpenEMR sites
  • Build a test harness script that spawns concurrent import processes
  • Add metrics collection (timing, memory, success/failure rates)
  • Document performance testing procedures

Proposed approach

  1. Extend compose.yml to support multiple sites (e.g., site1, site2, site3)
  2. Create a task perf:test command that:
    • Spins up N OpenEMR sites
    • Runs concurrent imports with configurable parallelism
    • Reports timing and success metrics
  3. Test scenarios:
    • N parallel imports to N different sites (should all succeed)
    • N parallel imports to same site (should serialize via locking)
    • Mixed workload with varying file sizes

Notes

  • Performance tests should not run in CI (too slow/resource-intensive)
  • Consider using small test fixtures rather than real vocabulary files
  • May want to measure memory usage for large imports

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