The Khan Microservice Granularity Pattern. Move the sliders to see whether a boundary adds value or is a distributed monolith. All math matches the paper exactly.
E = sum(useful local compute time) / sum(total transaction time),
where waiting on remote calls, serialization, and network are overhead (not useful).
Code that computes it: run_study.py
(AWS Lambda) and run_testbed.py (local HTTP testbed).
S = 1 - (change sets touching both sides of the cut) / (change sets touching this service).
Use intent-unit change sets and drop mechanical repo-wide commits (monorepos deflate S).
Code: gen_git_history.py.
L = clamp(static complexity / team capacity, 0, 1). Complexity from LOC, file count, and
(for serverless) code size / memory / config; capacity from the owning team's effective size. With no
trustworthy capacity source, hold it constant and report the run as structural (requirement N16).
Code: run_study.py
(measure_L from deployed Lambda config).