共 13 句 · 中英对照 · 对应本级 10 个目标词
开始练这一级 →A test in our billing service failed about once a week, then passed on rerun.我们计费服务里的一个测试大约每周失败一次,重跑又通过了。 We called it a flaky test, and a teammate guessed a heisenbug.我们把它叫作「flaky」测试,一位同事猜它是「heisenbug」。 Only staging with observability showed it again.只有在带回观测能力的 staging 环境里它才又出现。 Two threads wrote results in a different order, so the output was not deterministic.两个线程以不同顺序写入结果,所以输出不是「deterministic」的。 We fixed the ordering, and the test has been stable since.我们修正了顺序,此后这个测试一直稳定。
We also checked the cardinality of every customer key.我们还检查了每个客户键的「cardinality」。 We normalize each metric before we aggregate the daily totals.在「aggregate」每日总量之前,我们先「normalize」每个指标。 One date looked sparse, so we compared it with the rest of the month.有一天数据看起来「sparse」,我们就把它和当月其余日子做了比较。 A single outlier explained the gap: that day had much more variance.一个「outlier」解释了差距:那天的「variance」大得多。
Then we looked at the speed our users feel, and the dashboard showed a latency percentile we liked.然后我们看用户实际感受到的速度,面板给出了一个我们满意的「延迟」百分位。 The ninety-ninth percentile was the number users really felt.第九十九「percentile」才是用户真正感受到的数字。
A flaky test is a signal, never a conclusion.「flaky」测试只是一个信号,永远不是结论。 Careful measurement means both reproducible output, clean data, and the tail of the distribution.仔细的度量意味着可复现的输出、干净的数据,以及分布的尾部。
数据来源:NGSL(CC BY-SA 4.0)· ECDICT(MIT License)。短文为本项目为练习编写的配套材料。