Skip to content

Commit 2c31036

Browse files
committed
docs: use 'us' instead of 'µs' for microseconds in examples
Users may not know how to type the µ character. Go's time.ParseDuration accepts both 'us' and 'µs' for microseconds, so use the ASCII-friendly version in documentation and CI examples. Signed-off-by: Sertac Ozercan <[email protected]>
1 parent 694f2b5 commit 2c31036

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/test-gator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ jobs:
124124
--save /tmp/baseline.json
125125
126126
# Compare against baseline with min-threshold to handle CI variance
127-
# Fast policies (~200µs) can show large % swings from small absolute changes
127+
# Fast policies (~200us) can show large % swings from small absolute changes
128128
./bin/gator bench \
129129
--filename test/gator/bench/basic/ \
130130
--iterations 30 \
131131
--compare /tmp/baseline.json \
132132
--threshold 50 \
133-
--min-threshold 500µs
133+
--min-threshold 500us
134134
135135
- name: Test min-threshold
136136
run: |

website/docs/gator.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ gator bench --filename=policies/
663663
| `--save` | | | Save results to file for future comparison |
664664
| `--compare` | | | Compare against a baseline file |
665665
| `--threshold` | | `10` | Regression threshold percentage (for CI/CD) |
666-
| `--min-threshold` | | `0` | Minimum absolute latency difference to consider (e.g., `100µs`). Useful for fast policies where percentage changes may be noise. |
666+
| `--min-threshold` | | `0` | Minimum absolute latency difference to consider (e.g., `100us` or `100µs`). Useful for fast policies where percentage changes may be noise. |
667667
| `--stats` | | `false` | Gather detailed statistics from constraint framework |
668668

669669
### Examples
@@ -814,12 +814,12 @@ Bytes/Review 150.00 KB 152.00 KB +1.3% ✓
814814
For fast policies (< 1ms), small percentage changes may be noise. Use `--min-threshold` to set an absolute minimum difference:
815815

816816
```shell
817-
gator bench --filename=policies/ --compare=baseline.json --threshold=10 --min-threshold=100µs
817+
gator bench --filename=policies/ --compare=baseline.json --threshold=10 --min-threshold=100us
818818
```
819819

820820
This marks a metric as passing if either:
821821
- The percentage change is within the threshold (10%), OR
822-
- The absolute difference is less than the min-threshold (100µs)
822+
- The absolute difference is less than the min-threshold (100us)
823823

824824
### CI/CD Integration
825825

@@ -859,7 +859,7 @@ jobs:
859859
gator bench -f policies/ --memory \
860860
--compare=baseline.json \
861861
--threshold=10 \
862-
--min-threshold=100µs
862+
--min-threshold=100us
863863
else
864864
gator bench -f policies/ --memory --save=baseline.json
865865
fi
@@ -873,7 +873,7 @@ jobs:
873873
```
874874
875875
:::tip
876-
Use `--min-threshold` in CI to prevent flaky failures. For policies that evaluate in under 1ms, a 10% regression might only be 50µs of noise from system jitter.
876+
Use `--min-threshold` in CI to prevent flaky failures. For policies that evaluate in under 1ms, a 10% regression might only be 50us of noise from system jitter.
877877
:::
878878

879879
#### Exit Codes

0 commit comments

Comments
 (0)