共 10 句 · 中英对照 · 对应本级 10 个目标词
开始练这一级 →Our checkout endpoint felt slow last week, so we measured its response time.上周我们的结账接口感觉很慢,于是我们测量了它的「响应时间」。 The median looked fine, but the p99 quantile was worse, so averages alone misled us.中位数看着没问题,但 p99「分位数」更差,所以只看平均值会误导我们。
That was a useful caveat: the metric was real, and so was the slow query behind it.这是个有用的「注意事项」:这个指标是真实的,它背后那条慢查询也是真实的。
We then reduced how much the service logged, because a verbose log added overhead on every call.随后我们减少了服务的日志量,因为「啰嗦的」日志会给每次调用增加开销。 After the change our logs were concise, with one clear line per request plus its elapsed time.改动之后我们的日志很「简洁」,每个请求一行清晰的记录,外加它的「已耗」时间。 Nothing changed under the hood, yet we finally understood the timeout that users saw.「底层」什么都没变,但我们终于弄懂了用户遇到的「超时」。 Out of the box, most frameworks set that limit too high for an interactive page.「开箱即用时」,多数框架为交互式页面设置的该上限太高了。 We could cache more aggressively, but that trade-off would hurt correctness, so we chose a shorter timeout.我们本可以更激进地做缓存,但这个「取舍」会损害正确性,所以我们改用更短的超时。
At scale, a slow query costs more than a small cache, so we accepted the extra misses.「在规模上」,一条慢查询的代价超过一个小缓存,于是我们接受了多出来的未命中。 By Friday the turnaround time was acceptable, and each ticket was closed with plain, honest wording.到周五「周转时间」已经可以接受了,每张工单都用平实、诚实的措辞关掉了。
数据来源:NGSL(CC BY-SA 4.0)· ECDICT(MIT License)。短文为本项目为练习编写的配套材料。