Skip to content

Commit fa2678b

Browse files
committed
Grammar: Pluralize and restructure sentences for readability and clarity
1 parent 099819d commit fa2678b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/patterns/trace.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ head:
1616
---
1717

1818
# Trace
19-
**Trace** allow us to take tap into a life-cycle event and identifying performance bottleneck for our app.
19+
**Trace** allows us to tap into a life-cycle event and identify performance bottlenecks for our app.
2020

2121
![Example of usage of Trace](/assets/trace.webp)
2222

23-
Performance is another one of important aspect for Elysia.
23+
Performance is another important aspect for Elysia.
2424

25-
We don't want to be fast for benchmarking purpose, we want you to have a real fast server in real-world scenario.
25+
We don't want to be fast for benchmarking purposes, we want you to have a real fast server in real-world scenario.
2626

27-
There are many factor that can slow down your app, and it's hard to identifying one, and **trace** can helps solve that problem
27+
There are many factors that can slow down your app - and it's hard to identify them, but **trace** can helps solve that problem
2828

2929
## Trace
30-
Trace can measure lifecycle execution time of each function to audit performance bottleneck of each cycle.
30+
Trace can measure lifecycle execution time of each function to audit the performance bottleneck of each cycle.
3131

3232
```ts
3333
import { Elysia } from 'elysia'
@@ -56,7 +56,7 @@ Please refers to [lifecycle event](/concept/life-cycle) for more information:
5656
![Elysia Life Cycle](/assets/lifecycle.webp)
5757

5858
## Children
59-
You can tap deeper into each measure each function of life-cycle event by using children property of a life-cycle
59+
You can tap deeper and measure each function of a life-cycle event by using the **children** property of a life-cycle event
6060

6161
```ts
6262
import { Elysia } from 'elysia'
@@ -88,7 +88,7 @@ Every life cycle has support for children except for `handle`
8888
:::
8989

9090
## Name
91-
Measuring function by index can be hard to trace back to the function code, that's why trace provide a **name** property to easily identify the function by name.
91+
Measuring functions by index can be hard to trace back to the function code, that's why trace provides a **name** property to easily identify the function by name.
9292

9393
```ts
9494
import { Elysia } from 'elysia'
@@ -113,13 +113,13 @@ const app = new Elysia()
113113
```
114114

115115
::: tip
116-
If you are using arrow function or unnamed function, **name** will become **"anonymous"**
116+
If you are using an arrow function or unnamed function, **name** will become **"anonymous"**
117117
:::
118118

119119
## Set
120-
Inside trace calback, you can access `Context` of the request, and can mutate the value of the request itself, for example using `set.headers` to update headers.
120+
Inside the trace callback, you can access `Context` of the request, and can mutate the value of the request itself, for example using `set.headers` to update headers.
121121

122-
This is useful when you need support API like Server-Timing.
122+
This is useful when you need support an API like Server-Timing.
123123

124124
![Example of usage of Trace](/assets/server-timing.webp)
125125

@@ -137,13 +137,13 @@ const app = new Elysia()
137137
```
138138

139139
::: tip
140-
Using `set` inside `trace` can affect performance, as Elysia as to defer to execution to next micro-tick.
140+
Using `set` inside `trace` can affect performance, as Elysia defers the execution to the next micro-tick.
141141
:::
142142

143143
## Skip
144-
Sometime, `beforeHandle` or handler can throw can error, skipping the execution of some lifecycle.
144+
Sometimes, `beforeHandle` or handler can throw an error, skipping the execution of some lifecycles.
145145

146-
By default if this happens, each life-cycle will be resolved automatically, you can track if the API is executed or not by using `skip` property
146+
By default if this happens, each life-cycle will be resolved automatically, and you can track if the API is executed or not by using `skip` property
147147

148148
```ts
149149
import { Elysia } from 'elysia'

0 commit comments

Comments
 (0)