Skip to content

Commit

Permalink
doc: add missing hyphens to simple-profiling.md (#3859)
Browse files Browse the repository at this point in the history
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
  • Loading branch information
Trott and XhmikosR authored May 10, 2021
1 parent 56222b9 commit 78b11dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions locale/en/docs/guides/simple-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ layout: docs.hbs
# Easy profiling for Node.js Applications

There are many third party tools available for profiling Node.js applications
but, in many cases, the easiest option is to use the Node.js built in profiler.
The built in profiler uses the [profiler inside V8][] which samples the stack at
but, in many cases, the easiest option is to use the Node.js built-in profiler.
The built-in profiler uses the [profiler inside V8][] which samples the stack at
regular intervals during program execution. It records the results of these
samples, along with important optimization events such as jit compiles, as a
series of ticks:
Expand Down Expand Up @@ -80,7 +80,7 @@ should not be trying to design your own cryptographic authentication mechanisms
in general. It is much better to use existing, proven authentication solutions.*

Now assume that we've deployed our application and users are complaining about
high latency on requests. We can easily run the app with the built in profiler:
high latency on requests. We can easily run the app with the built-in profiler:

```
NODE_ENV=production node --prof app.js
Expand Down Expand Up @@ -124,7 +124,7 @@ Percentage of the requests served within a certain time (ms)

From this output, we see that we're only managing to serve about 5 requests per
second and that the average request takes just under 4 seconds round trip. In a
real world example, we could be doing lots of work in many functions on behalf
real-world example, we could be doing lots of work in many functions on behalf
of a user request but even in our simple example, time could be lost compiling
regular expressions, generating random salts, generating unique hashes from user
passwords, or inside the Express framework itself.
Expand Down Expand Up @@ -207,7 +207,7 @@ accounts not only for the 51.8% from above but also for all CPU time in the top
3 most sampled functions since the calls to `_sha1_block_data_order` and
`_malloc_zone_malloc` were made on behalf of the pbkdf2 function.

At this point, it is very clear that the password based hash generation should
At this point, it is very clear that the password-based hash generation should
be the target of our optimization. Thankfully, you've fully internalized the
[benefits of asynchronous programming][] and you realize that the work to
generate a hash from the user's password is being done in a synchronous way and
Expand Down

0 comments on commit 78b11dd

Please sign in to comment.