@ntcore-ts/client 1.1.0-beta.1 → 1.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -20,14 +20,14 @@ const gyro = ntcore.getDoubleTopic('/MyTable/Gyro');
20
20
  gyro.subscribe((value) => console.log(value));
21
21
  ```
22
22
 
23
- The hot path (msgpack decode + schema parse) is about **1 million frames/s** on an Apple M1 Pro (~1.2 µs per single-message frame). Typical FRC NT rates are tens to low thousands of updates per second.
23
+ The hot path (msgpack decode + shape check) is about **2.6 million frames/s** on an Apple M1 Pro (~0.4 µs per single-message frame). Typical FRC NT rates are tens to low thousands of updates per second.
24
24
 
25
25
  ```mermaid
26
26
  xychart-beta
27
27
  title "Messages per second by frame size (Apple M1 Pro)"
28
28
  x-axis ["1 msg/frame", "10 msg/frame", "100 msg/frame"]
29
- y-axis "thousands of messages/s" 0 --> 1800
30
- bar [1006, 1643, 1740]
29
+ y-axis "thousands of messages/s" 0 --> 16000
30
+ bar [2628, 10097, 14297]
31
31
  ```
32
32
 
33
33
  ## Building
@@ -49,7 +49,7 @@ Benchmarks measure how fast the client processes WebSocket messages. They are **
49
49
 
50
50
  **What is measured**
51
51
 
52
- - **Tier 1 (hot path)**: Binary frame processing in isolation—decode (msgpack), schema parse, and callback. Benchmarks: one frame with 1, 10, or 100 messages.
52
+ - **Tier 1 (hot path)**: Binary frame processing in isolation—decode (msgpack), shape check, and callback. Benchmarks: one frame with 1, 10, or 100 messages.
53
53
  - **Tier 2 (`onMessage`)**: 100 binary frames through `onMessage` → `handleBinaryFrame` → `onTopicUpdate`.
54
54
 
55
55
  Both tiers use a mock server for the socket connection (no real NT server or robot). Results are reported as Hz (ops/sec), with min/max/mean and percentiles (e.g. p99).
@@ -58,10 +58,10 @@ Both tiers use a mock server for the socket connection (no real NT server or rob
58
58
 
59
59
  | Workload | Frames or batches/s | Mean | Messages/s |
60
60
  | ------------------------------ | ------------------: | -----: | ---------: |
61
- | 1 message / frame | 1.01M | 1.2 µs | 1.01M |
62
- | 10 messages / frame | 164k | 7.8 µs | 1.64M |
63
- | 100 messages / frame | 17k | 73 µs | 1.74M |
64
- | 100 frames through `onMessage` | 6.3k | 159 µs | 632k |
61
+ | 1 message / frame | 2.63M | 0.4 µs | 2.63M |
62
+ | 10 messages / frame | 1.01M | 1.1 µs | 10.1M |
63
+ | 100 messages / frame | 143k | 7.1 µs | 14.3M |
64
+ | 100 frames through `onMessage` | 16.1k | 63 µs | 1.61M |
65
65
 
66
66
  CI re-runs these benches on every PR and fails if throughput drops to half of `main`. See the [performance guide](https://ntcore.chrislawson.dev/guide/performance).
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntcore-ts/client",
3
- "version": "1.1.0-beta.1",
3
+ "version": "1.1.0-beta.2",
4
4
  "description": "TypeScript client for WPILib NetworkTables 4.1 protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "build": "rm -rf dist && rollup -c rollup.config.mts",
26
26
  "test": "vitest run",
27
27
  "bench": "vitest bench --run",
28
- "lint": "eslint ."
28
+ "lint": "oxlint ."
29
29
  },
30
30
  "dependencies": {
31
31
  "@msgpack/msgpack": "^3.1.3",