|
13 | 13 | //! To create a [`Profiler`], call the [`Profiler::new()`] function and provide a `Path` with
|
14 | 14 | //! the directory and file name for the trace files.
|
15 | 15 | //!
|
16 |
| -//! To record an event, call the [`Profiler::record_instant_event()`] method, passing a few arguments: |
| 16 | +//! To record an event, call the [`Profiler::record_instant_event()`] method, passing a few |
| 17 | +//! arguments: |
17 | 18 | //! - `event_kind`: a [`StringId`] which assigns an arbitrary category to the event
|
18 | 19 | //! - `event_id`: a [`StringId`] which specifies the name of the event
|
19 | 20 | //! - `thread_id`: a `u32` id of the thread which is recording this event
|
20 | 21 | //!
|
21 |
| -//! Alternatively, events can also be recorded via the [`Profiler::start_recording_interval_event()`] method. This |
22 |
| -//! method records a "start" event and returns a `TimingGuard` object that will automatically record |
23 |
| -//! the corresponding "end" event when it is dropped. |
| 22 | +//! Alternatively, events can also be recorded via the |
| 23 | +//! [`Profiler::start_recording_interval_event()`] method. This method records a "start" event and |
| 24 | +//! returns a `TimingGuard` object that will automatically record the corresponding "end" event |
| 25 | +//! when it is dropped. |
24 | 26 | //!
|
25 | 27 | //! To create a [`StringId`], call one of the string allocation methods:
|
26 |
| -//! - [`Profiler::alloc_string()`]: allocates a string and returns the [`StringId`] that refers to it |
27 |
| -//! - [`Profiler::alloc_string_with_reserved_id()`]: allocates a string using the specified [`StringId`]. |
28 |
| -//! It is up to the caller to make sure the specified [`StringId`] hasn't already been used. |
29 |
| -//! |
30 |
| -//! [`Profiler`]: struct.Profiler.html |
31 |
| -//! [`Profiler::alloc_string()`]: struct.Profiler.html#method.alloc_string |
32 |
| -//! [`Profiler::alloc_string_with_reserved_id()`]: struct.Profiler.html#method.alloc_string_with_reserved_id |
33 |
| -//! [`Profiler::new()`]: struct.Profiler.html#method.new |
34 |
| -//! [`Profiler::record_event()`]: struct.Profiler.html#method.record_event |
35 |
| -//! [`Profiler::start_recording_interval_event()`]: struct.Profiler.html#method.start_recording_interval_event |
36 |
| -//! [`StringId`]: struct.StringId.html |
37 |
| -
|
38 |
| -#![deny(warnings)] |
| 28 | +//! - [`Profiler::alloc_string()`]: allocates a string and returns the [`StringId`] that refers |
| 29 | +//! to it |
| 30 | +//! |
| 31 | +//! [`Profiler`]: Profiler |
| 32 | +//! [`Profiler::alloc_string()`]: Profiler::alloc_string |
| 33 | +//! [`Profiler::alloc_string_with_reserved_id()`]: Profiler::alloc_string_with_reserved_id |
| 34 | +//! [`Profiler::new()`]: Profiler::new |
| 35 | +//! [`Profiler::record_event()`]: Profiler::record_event |
| 36 | +//! [`Profiler::start_recording_interval_event()`]: Profiler::start_recording_interval_event |
| 37 | +//! [`StringId`]: StringId |
| 38 | +#![deny( |
| 39 | + warnings, |
| 40 | + intra_doc_link_resolution_failure, |
| 41 | +)] |
39 | 42 |
|
40 | 43 | pub mod event_id;
|
41 | 44 | pub mod file_header;
|
|
0 commit comments