Skip to content

Commit

Permalink
Add manual timestamp example
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwalsh0 committed Nov 7, 2024
1 parent 303d9f4 commit d5d0124
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/performance-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,25 @@ function someOtherFunction() {
...
}
```

#### Use manual timestamps in a trace.

```ts
import { trace, endTrace, TraceName } from '...';

...

trace({
name: TraceName.SomeTrace,
startTime: Date.now() - 123
});

...

endTrace({
name: TraceName.SomeTrace,
timestamp: Date.now() + 456
});

...
```

0 comments on commit d5d0124

Please sign in to comment.