We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
EventId
1 parent e778699 commit 90716e8Copy full SHA for 90716e8
measureme/src/event_id.rs
@@ -78,4 +78,17 @@ impl<'p> EventIdBuilder<'p> {
78
StringComponent::Ref(arg),
79
]))
80
}
81
+
82
+ pub fn from_label_and_args(&self, label: StringId, args: &[StringId]) -> EventId {
83
+ // The capacity is the number of args + the same number for arg separators + the label.
84
+ let mut parts = Vec::with_capacity(args.len() * 2 + 1);
85
+ parts.push(StringComponent::Ref(label));
86
87
+ for arg in args {
88
+ parts.push(StringComponent::Value(SEPARATOR_BYTE));
89
+ parts.push(StringComponent::Ref(*arg));
90
+ }
91
92
+ EventId(self.profiler.alloc_string(&parts[..]))
93
94
0 commit comments