Add workflow load testing framework with multi-language starter packages#293
Draft
Add workflow load testing framework with multi-language starter packages#293
Conversation
…ross go/python/typescript - align Go/Python/TypeScript starter execution model and simplify client starter semantics\n- remove monitor-era execute traceback and metadata-heavy /info payloads (readiness-only /info)\n- add optional keyed ClientPool helpers across Go/Python/TypeScript\n- wire worker Prometheus metrics via --prom-listen-address in starter runtimes\n- refresh workflowtests docs/snippets for native-first usage and optional pooling\n- keep runner protocol focused on /execute + readiness checks
- Simplify build.go comments to focus on what/why instead of sdkbuild internals - Delete internal/promconfig/ (unused dynamic config generator, superseded by static YAML files) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0cd77ab to
b59d7e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a workflow load testing framework that builds and runs test projects across Go, Python, and TypeScript. This enables benchmarking Temporal SDK worker performance (CPU, memory, latency, throughput) under controlled load with metrics export to Parquet.
New CLI commands
omes workflow— Build a test project, spawn client/worker processes, run load, and export metricsomes exec— Build and run a test project as a managed subprocess (with signal forwarding and graceful shutdown)Starter packages (
workflowtests/)Each language gets a shared "starter" library that handles CLI parsing, HTTP server setup, connection pooling, and Prometheus integration — so test authors write normal Temporal SDK code:
workflowtests/go/starter/) —starter.Run(clientFn, workerFn)withClientPoolfor connection reuseworkflowtests/python/omes_starter/) —run(client=..., worker=...)with asyncClientPoolworkflowtests/typescript/src/) —run({ client, worker })with Express HTTP server andClientPoolEach includes a
simple-testexample project.Metrics collection and export
IMPORTANT NOTE: this is largely similar to what
prometheus.gooffers today, but written more nicely, and not dependent on a locally spun upPrometheusInstance. The idea is to get this merged than rip out that code (for instance, we do not need aPrometheusInstanceor any of its accompanying flags). This should reduce the flag sprawl.Docker support
Program building (
internal/programbuild/)sdkbuildwith SDK version auto-detection and local SDK path supportNOTE: the Typescript build is a bit janky, but works for now. I plan to improve this when the need arises.
Reviewer guide
FWIW - this is a purely additive change, non-breaking and Omes currently doesn't have much public usage
This is a large PR (~10k lines). Here's how to approach it:
Start with the CLI commands —
cmd/cli/workflow.goandcmd/cli/exec.goare the entry points that wire everything together. They show the overall flow: build → spawn → load → export.Core infrastructure (most important to review carefully):
internal/programbuild/— How programs are built and run per languagemetrics/export_pipeline.go— Prometheus query → Parquet export pipeline (essentially a better package for prom querying and export than what exists inprometheus.gometrics/query_presets.go— Curated PromQL queries (these basically replicate what already exists inprometheus.go, with the only exception being that we offer raw and smoothed CPU (this was necessary because some worker CPU profiles oscillate a lot (TS) and thereby make it very difficult to signal anything)metrics/metrics.go(theprocessCollectoraddition) — Cross-platform CPU/memory collectionloadgen/http_executor.go— HTTP-based load executorinternal/utils/net.go— Port allocation and readiness pollingStarter packages — Each language follows basically same pattern:
workflowtests/go/starter/→workflowtests/python/omes_starter/→workflowtests/typescript/src/Note: Go is slightly different here because we have to wire up metrics ourselves. The implementation is largely the same as what exists in
clioptions/metrics.gobut we have to put it here for the Go project to be standalone.workflowtests/dockerfiles/, theREADME.mdthere explains the setup.Test plan
I've been using this locally to run load tests.
omes workflow --language typescript --project-dir workflowtests/typescript/tests/simple-test --spawn-worker --duration 3mruns successfully🤖 Generated with Claude Code