Skip to content

UNOMI-957: Add cross-platform memory sampling for integration test runs#782

Merged
sergehuber merged 4 commits into
masterfrom
UNOMI-957-it-memory-sampling
Jun 27, 2026
Merged

UNOMI-957: Add cross-platform memory sampling for integration test runs#782
sergehuber merged 4 commits into
masterfrom
UNOMI-957-it-memory-sampling

Conversation

@sergehuber

Copy link
Copy Markdown
Contributor

Summary

  • Adds a background memory sampler during ./build.sh --integration-tests (Karaf heap/GCT, search engine heap, Docker RSS, host RAM/swap/load).
  • Introduces itests/sample-it-memory.sh (start/stop/summarize/operator-note/verify) and itests/lib/it-run-memory.sh with macOS and Linux collectors.
  • Writes memory-samples.tsv, memory-summary.txt, and auto-generated it-run-operator-note.txt under itests/target/.
  • Archives memory artifacts via archive-it-run.sh and uploads CI artifact it-memory-metrics-*.

JIRA

https://issues.apache.org/jira/browse/UNOMI-957

Test plan

  • cd itests && ./sample-it-memory.sh verify (macOS and Linux)
  • ./build.sh --integration-tests — sampler starts/stops; peaks in memory-summary.txt
  • ./build.sh --integration-tests --no-memory-sampler — no sampler artifacts required
  • ./archive-it-run.sh — memory files included in capture
  • CI: it-memory-metrics-* artifact present after workflow run

Record Karaf, search engine, Docker, and host memory metrics during
./build.sh --integration-tests, summarize peaks for archiving and CI,
and auto-generate operator notes tied to each run.
@sergehuber sergehuber force-pushed the UNOMI-957-it-memory-sampling branch from dd5bbba to 5c15522 Compare June 27, 2026 13:03
…ple line

The function-as-variable guards in it_memory_resolve_search_engine and
it_memory_read_trace_heap_mb always evaluated false, so OpenSearch IT
runs silently sampled the wrong Docker container/port, and the
karaf-heap pom fallback never ran. Also fix a printf format string
with one more %s placeholder than arguments, which appended a spurious
empty trailing column to every memory-samples.tsv row.
Give the synthetic RUNNING task a valid node lock so background
recoverCrashedTasks() cannot mark it before preDestroy() runs.
Run purge/load in system tenant context, persist preDestroy test tasks with a lock in a single save, and cancel system tasks before asserting execution count.
@sergehuber sergehuber merged commit 2a2f6cf into master Jun 27, 2026
6 checks passed
@sergehuber sergehuber deleted the UNOMI-957-it-memory-sampling branch June 27, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant