feat(workflow): living-server supervises the locust UI, locust load test and coverage gate

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 03:10:28 +02:00
co-authored by Claude Sonnet 5.5
parent 97b4b5f574
commit bb8fcf9cf7
7 changed files with 392 additions and 5 deletions
+10 -3
View File
@@ -4,6 +4,7 @@
# make -f example/example.mk example # build lib + server
# make -f example/example.mk example-test # build + run example suite
# make -f example/example.mk example-clean # remove build/example
# make -f example/example.mk example-locust # headless locust run
# Portable make: variables plus sh loops only, no GNU-only functions.
CXX ?= g++
@@ -70,7 +71,7 @@ EXAMPLE_ASSETS = \
$(EXAMPLE_DIR)/assets/stats.js
EXAMPLE_INC = -I$(EXAMPLE_DIR) -I$(EXAMPLE_BUILD)
.PHONY: example example-assets example-test example-clean
.PHONY: example example-assets example-test example-clean example-locust
# Asset embedding is part of the build: example/assets (Chart.js included)
# becomes generated C++ under build/example/gen via the MoloApp embedder.
@@ -94,8 +95,10 @@ example: example-assets
$(CXX) $(EXAMPLE_CXXFLAGS) -c $(EXAMPLE_GEN)/assets.cpp \
-o $(EXAMPLE_BUILD)/obj/gen_assets.o
ar rcs $(EXAMPLE_BUILD)/libexample.a $(EXAMPLE_BUILD)/obj/*.o
$(CXX) $(EXAMPLE_CXXFLAGS) -I$(EXAMPLE_DIR) $(EXAMPLE_DIR)/main.cpp \
$(EXAMPLE_BUILD)/libexample.a -o $(EXAMPLE_BUILD)/living-server
$(MAKE) -f src/supervisor/supervisor.mk build/supervisor/libsupervisor.a
$(CXX) $(EXAMPLE_CXXFLAGS) -I$(EXAMPLE_DIR) -Isrc $(EXAMPLE_DIR)/main.cpp \
$(EXAMPLE_BUILD)/libexample.a build/supervisor/libsupervisor.a \
-o $(EXAMPLE_BUILD)/living-server
example-test: example
rm -rf $(EXAMPLE_BUILD)/tests
@@ -116,6 +119,10 @@ example-test: example
echo "example suite: $$pass passed, $$fail failed"; \
test $$fail -eq 0
example-locust:
python3 $(EXAMPLE_DIR)/check_locust_coverage.py
locust -f $(EXAMPLE_DIR)/locustfile.py --host $${LOCUST_HOST:-http://127.0.0.1:8080} --headless -u $${LOCUST_USERS:-10} -r $${LOCUST_RATE:-2} -t $${LOCUST_TIME:-30s}
example-clean:
rm -rf $(EXAMPLE_BUILD)