@@ -10,13 +10,13 @@ Install the package:
1010bun add @edgefirst-dev/server-timing
1111```
1212
13- Instantiate the collector:
13+ Instantiate the timing collector:
1414
1515``` ts
16- import { Collector } from " @edgefirst-dev/server-timing" ;
16+ import { TimingCollector } from " @edgefirst-dev/server-timing" ;
1717
1818// You can instantiate this in the getLoadContext of Remix or React Router
19- let collector = new Collector ();
19+ let collector = new TimingCollector ();
2020```
2121
2222Take measurements:
@@ -42,9 +42,9 @@ collector.toHeaders(headers);
4242You can also manually collect timings:
4343
4444``` ts
45- import { ServerTiming } from " @edgefirst-dev/server-timing" ;
45+ import { Timing } from " @edgefirst-dev/server-timing" ;
4646
47- let timing = new ServerTiming (" name" , " description" );
47+ let timing = new Timing (" name" , " description" );
4848
4949timing .measure (async () => {
5050 // do something
@@ -53,7 +53,7 @@ timing.measure(async () => {
5353collector .add (timing );
5454```
5555
56- Each ` ServerTiming ` can be used once. If you want to take different measurements, create a new ` ServerTiming ` instance.
56+ Each ` Timing ` can be used once. If you want to take different measurements, create a new ` Timing ` instance.
5757
5858> [ !TIP]
59- > Use the ` Collector#measure ` method to automatically create a ` ServerTiming ` instance and add it to the collector.
59+ > Use the ` Collector#measure ` method to automatically create a ` Timing ` instance and add it to the collector.
0 commit comments