blob: 5aa9d1b868e8cf56c1f70cdf86c94943be1590ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "handle.h"
#include <vespa/vespalib/stllike/string.h>
namespace vespalib::metrics {
struct MetricIdTag {};
/**
* Opaque handle representing an uniquely named metric.
**/
struct MetricId : Handle<MetricIdTag>
{
explicit MetricId(size_t id) : Handle(id) {}
static MetricId from_name(const vespalib::string& name);
const vespalib::string& as_name() const;
};
} // namespace vespalib::metrics
|