关于「从日志找瓶颈、合约账本与预注册的切换实验」,《瓶颈、自蚕食与顾问定价》给出的定量结论是什么?

结论:第八章从事件日志找瓶颈(30 天认对的概率 0.976),给出合约账本与一项预注册的切换实验。书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。

数据口径:书中的团队产能、需求参数、毛利、噪声与合约参数均为示意或合成模型;全部数据由书中程序生成;本书不是投资、法律或税务意见。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的假说。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.976, 30

   team         true load  logged load (30 days)
   content          0.714        0.778
   acquisition      0.625        0.678
   conversion       0.833        0.858
   fulfilment       0.579        0.553
    1 logged days: bottleneck named correctly 0.526
    3 logged days: bottleneck named correctly 0.716
    7 logged days: bottleneck named correctly 0.827
   14 logged days: bottleneck named correctly 0.904
   30 logged days: bottleneck named correctly 0.976
查看完整验算程序
# Chapter 8. p14: Finding the bottleneck from event logs. The network of
# p01 is simulated job by job for 32 days (2 days warm-up) at 20 jobs a
# day; each day's log gives every team's busy fraction (busy server time
# / (servers x 1 day)). How often does a sample of k logged days name the
# right team? Bootstrap over days, seed 83, 2,000 resamples per k.
import heapq
import importlib.util
import random

def load(name):
    spec = importlib.util.spec_from_file_location(name, name + ".py")
    m = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(m)
    return m

p01 = load("p01_jackson_open")
C, MU = p01.BASE["c"], p01.BASE["mu"]
DAYS, WARM = 32, 2

def simulate(rng, lam=20.0):
    busy = [[0.0] * DAYS for _ in range(4)]
    free = list(C)
    queue = [[] for _ in range(4)]
    ev = [(rng.expovariate(lam), 0, -1)]      # (time, kind, station)
    seq = 0

    def add_busy(i, t0, t1):
        while t0 < t1 and int(t0) < DAYS:
            d = int(t0)
            step = min(t1, d + 1) - t0
            busy[i][d] += step
            t0 += step

    def start(i, t):
        nonlocal seq
        free[i] -= 1
        s = rng.expovariate(MU[i])
        add_busy(i, t, t + s)
        seq += 1
        heapq.heappush(ev, (t + s, seq, i))

    def arrive(i, t):
        if free[i] > 0:
            start(i, t)
        else:
            queue[i].append(t)

    while ev:
        t, kind, i = heapq.heappop(ev)
        if t >= DAYS:
            break
        if i < 0:
            arrive(0, t)
            heapq.heappush(ev, (t + rng.expovariate(lam), 0, -1))
            continue
        free[i] += 1
        if queue[i]:
            queue[i].pop(0)
            start(i, t)
        u, acc = rng.random(), 0.0
        for j in range(4):
            acc += p01.ROUTE[i][j]
            if u < acc:
                arrive(j, t)
                break
    return [[busy[i][d] / C[i] for d in range(WARM, DAYS)]
            for i in range(4)]

if __name__ == "__main__":
    rng = random.Random(83)
    load_ = simulate(rng)
    n = len(load_[0])
    true = p01.network(20.0, C, MU)[0]
    print("   team         true load  logged load ({} days)".format(n))
    for i, name in enumerate(p01.NAMES):
        print("   {:<12} {:9.3f}  {:11.3f}".format(
            name, true[i], sum(load_[i]) / n))
    for k in (1, 3, 7, 14, 30):
        hit = 0
        for _ in range(2000):
            days = [rng.randrange(n) for _ in range(k)]
            est = [sum(load_[i][d] for d in days) for i in range(4)]
            hit += max(range(4), key=lambda i: est[i]) == 2
        print("   {:2d} logged days: bottleneck named correctly {:.3f}"
              .format(k, hit / 2000))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《企业瓶颈诊断、产品线自蚕食审计与自动化改造回报边界》第 8 章「从日志找瓶颈、合约账本与预注册的切换实验」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090217

DOI: 10.5281/zenodo.24090217 · 阅读本章所在专著 · 5DL-B-083 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026083,
  author    = {Fan, Yafu},
  title     = {Enterprise Bottleneck Diagnostics, SKU Cannibalization Audits and Automation Return Bounds},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090217},
  url       = {https://doi.org/10.5281/zenodo.24090217}
}

本书其他章节结论