Skip to content

Commit 2221ca2

Browse files
committed
[docs] Minor doc fixes + profiling info
1 parent 4413b2d commit 2221ca2

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

docs/development.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The CLI runs with `cargo run -- <CLI_ARGS>`, and Rust-based tests run with
1616
Many of the most important test cases are written as Python-based integration
1717
tests instead of Rust tests, in order to use the
1818
[garmin-fit-sdk](https://pypi.org/project/garmin-fit-sdk/) Python package as a
19-
reference implementation for FIT decoding. Run these with
19+
reference implementation of FIT decoding. Run these with
2020
[uv](https://docs.astral.sh/uv/):
2121

2222
```
@@ -44,3 +44,13 @@ the top-level project directory:
4444
ruff check
4545
ruff format
4646
```
47+
48+
## Profiling
49+
50+
[cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph) is very
51+
helpful for identifying hot spots. Set the environment variable
52+
`CARGO_PROFILE_RELEASE_DEBUG=true` before running.
53+
54+
Setting log level `-L debug` enables tracing summaries that can also be useful
55+
for understanding performance, but this seems to have a non-negligible
56+
measurement effect, especially on dev builds.

docs/garmin_fit.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,3 @@ Also big endian.
108108
Setting the "notify before turn" option when exporting makes the cues being exported as course points appear earlier on the course: The distance field is reduced by the specified amount, and the course point's latitude and longitude are also adjusted.
109109

110110
In contrast with Garmin Connect, doesn't set `message_index` on course point messages. Uses size 16 for the name string.
111-
112-
## Device experiments
113-
114-
TODO

docs/point_types.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ Connect. Particularly, importing such FIT files containing more than four
9696
course points resulted in *no* course points appearing. I haven't yet
9797
reproduced this behavior with conversions of "real" courses, however.
9898

99-
## RideWithGPS POIs
99+
## Ride with GPS POIs
100100

101101
Ride with GPS has various POI types. When these are exported as GPX
102-
waypoints, they will correspond to certain `cmt` and `type` XML attributes.
102+
waypoints, they will correspond to certain `cmt` and `type` XML elements.
103103
Thanks to the new (if confusingly named) [Waypoints
104104
feature](https://ridewithgps.com/news/11178-introducing-waypoints), when
105105
exported in a FIT file, they also will correspond to certain FIT course point
106106
types.
107107

108108
This table shows how the different POI types map to GPX and FIT types as of
109-
2025-06-14. The `cmt` XML attribute used in GPX exports corresponds to the
110-
RWGPS POI type, while the `type` attribute always equals the FIT course point
109+
2025-06-14. The `cmt` XML element used in GPX exports corresponds to the
110+
RWGPS POI type, while the `type` element always equals the FIT course point
111111
type.
112112

113-
| Type | Icon | GPX cmt attr | GPX type attr | FIT type |
113+
| Type | Icon | GPX `cmt` | GPX `type` | FIT type |
114114
|-------------------|-------------------------------------------------------|---------------------|---------------|---------------|
115115
| Information | ![Information](img/rwgps-information.png) | `generic` | `generic` | `generic` |
116116
| Caution | ![Caution](img/rwgps-caution.png) | `caution` | `danger` | `danger` |
@@ -152,7 +152,7 @@ type.
152152
| Segment End | ![Segment End](img/rwgps-segment-end.png) | `segment_end` | `generic` | `generic` |
153153
| Control | ![Control](img/rwgps-control.png) | `control` | `checkpoint` | `checkpoint` |
154154

155-
All POI types set `Dot` as `sym` in the GPX export.
155+
All POI types set `sym` to `Dot` in the GPX export.
156156

157157
The full set of course point types used by Ride with GPS in FIT exports of
158158
custom POIs and Waypoints (setting aside cues) is then:
@@ -191,19 +191,19 @@ In GPX exports, Gaia GPS indicates the point type by the text in the
191191
waypoint's `sym` sub-element. These basically, but not precisely, match the
192192
waypoint's type; many have a `-24` suffix, which presumably corresponds to an
193193
icon size. With others, such as `:gaia-body-of-water:`, the `sym` text is
194-
simplified to `water` for example. The exact string used is shown in the Sym
195-
column below.
194+
simplified to `water` for example. The exact string used is shown in the "GPX
195+
`sym`" column below.
196196

197197
The Course Point column contains my interpretation of the course point type
198198
this Gaia GPS waypoint type best maps onto, with a blank defaulting to the
199199
`generic` type. Of note, I abuse the `overlook` type to represent any sort of
200-
"oh cool look at that" waypoint, give its rendering as a camera icon on the
200+
"oh cool look at that" waypoint, given its rendering as a camera icon on the
201201
devices I've tested. I also take liberties drawing meaning from waypoints'
202202
icons rather than their names, such as mapping numbers 1 through 4 to climb
203203
category course points, or "steps" to "steep climb", because they'll render
204204
similarly on devices as to on Gaia GPS.
205205

206-
| Type | Icon | Sym | Course Point |
206+
| Type | Icon | GPX `sym` | Course Point |
207207
|------------------------------|-----------------------------------------|--------------------------|-------------------|
208208
| `:gaia-pin:` | ![gaia-icon-0](img/gaia-icon-0.png) | None | |
209209
| `:gaia-airport:` | ![gaia-icon-1](img/gaia-icon-1.png) | `airport-24` | `transport` |

0 commit comments

Comments
 (0)