зеркало из https://github.com/mozilla/glean.git
Update docs/dev/core/new-metric-type.md
Co-Authored-By: Michael Droettboom <mdboom@gmail.com>
This commit is contained in:
Родитель
9b6ab16eb6
Коммит
5100c3289b
|
@ -140,7 +140,7 @@ Each metric type is implemented in its own module.
|
|||
Add a new file named after your metric, e.g. `glean-core/ffi/src/counter.rs`, and declare it in `glean-core/ffi/src/lib.rs` with `mod counter;`.
|
||||
|
||||
In the metric type module define your metric type using the `define_metric` macro.
|
||||
This allows to reference the metric name and defines the global map as well as some common functions such as the constructor and destructor.
|
||||
This allows referencing the metric name and defines the global map as well as some common functions such as the constructor and destructor.
|
||||
Simple operations can be also defined in the same macro invocation:
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче