Skip to content

Commit 7e42320

Browse files
committed
Clarify documentation
1 parent 60a59ae commit 7e42320

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/doc/rustc/src/json.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,18 +303,22 @@ its not used by any of the targets.)
303303
**This setting is currently unstable and requires usage of `-Zunstable-options`.**
304304

305305
The `--timings` option will tell `rustc` to emit messages when a certain compilation
306-
section (such as code generation or linking) begins or ends. The messages will have
306+
section (such as code generation or linking) begins or ends. The messages currently have
307307
the following format:
308308

309309
```json
310310
{
311311
"$message_type": "section_timing", /* Type of this message */
312312
"event": "start", /* Marks the "start" or "end" of the compilation section */
313313
"name": "link", /* The name of the compilation section */
314-
"time": 12345 /* Opaque timestamp when the message was emitted, in microseconds */
314+
// Opaque timestamp when the message was emitted, in microseconds
315+
// The timestamp is currently relative to the beginning of the compilation session
316+
"time": 12345
315317
}
316318
```
317319

320+
Note that the JSON format of the `timings` messages is unstable and subject to change.
321+
318322
Compilation sections can be nested; for example, if you encounter the start of "foo",
319323
then the start of "bar", then the end of "bar" and then the end of "bar", it means that the
320324
"bar" section happened as a part of the "foo" section.

0 commit comments

Comments
 (0)