性能不佳

¥Poor Performance

在本文档中,你可以了解如何分析 Node.js 进程。

¥In this document you can learn about how to profile a Node.js process.

我的应用性能不佳

¥My application has a poor performance

症状

¥Symptoms

我的应用延迟很高,我已经确认瓶颈不是我的依赖,如数据库和下游服务。所以我怀疑我的应用花费了大量时间来运行代码或处理信息。

¥My applications latency is high and I have already confirmed that the bottleneck is not my dependencies like databases and downstream services. So I suspect that my application spends significant time to run code or process information.

你对应用性能总体上感到满意,但想了解我们应用的哪些部分可以改进以运行得更快或更高效。当我们想要改善用户体验或节省计算成本时,它会很有用。

¥You are satisfied with your application performance in general but would like to understand which part of our application can be improved to run faster or more efficient. It can be useful when we want to improve the user experience or save computation cost.

调试

¥Debugging

在此用例中,我们对比其他代码段使用更多 CPU 周期的代码段感兴趣。当我们在本地执行此操作时,我们通常会尝试优化我们的代码。

¥In this use-case, we are interested in code pieces that use more CPU cycles than the others. When we do this locally, we usually try to optimize our code.

本文档提供了两种简单方法来分析 Node.js 应用:

¥This document provides two simple ways to profile a Node.js application: