-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(s2n-quic-core): add metrics trait
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/// A Recorder should arrange to emit the properties and counters on Drop into some output. | ||
pub trait Recorder: 'static + Send + Sync { | ||
/// Registers a counter with the recorder instance | ||
fn increment_counter(&self, name: &str, amount: usize); | ||
|
||
/// Associates a key/value pair with the recorder instance | ||
fn set_value<V: core::fmt::Display>(&self, key: &str, value: V); | ||
} |