github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/metric/condmetric_profiling_fake.go (about)

     1  // Copyright 2022 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  //go:build !condmetric_profiling
    16  // +build !condmetric_profiling
    17  
    18  package metric
    19  
    20  // ProfilingUint64Metric is a metric type that is registered and used only when
    21  // the "condmetric_profiling" go tag is specified when building runsc.
    22  //
    23  // Otherwise it is exactly like a Uint64Metric.
    24  type ProfilingUint64Metric = FakeUint64Metric
    25  
    26  // ProfilingDistributionMetric is a metric type that is registered and used only
    27  // when the "condmetric_profiling" go tag is specified when building runsc.
    28  //
    29  // Otherwise it is exactly like a DistributionMetric.
    30  type ProfilingDistributionMetric = FakeDistributionMetric
    31  
    32  // ProfilingTimerMetric is a metric type that is registered and used only when
    33  // the "condmetric_profiling" go tag is specified when building runsc.
    34  //
    35  // Otherwise it is exactly like a TimerMetric.
    36  type ProfilingTimerMetric = FakeTimerMetric
    37  
    38  // NewProfilingUint64Metric is equivalent to NewUint64Metric except it creates a
    39  // ProfilingUint64Metric
    40  var NewProfilingUint64Metric = NewFakeUint64Metric
    41  
    42  // MustCreateNewProfilingUint64Metric is equivalent to MustCreateNewUint64Metric
    43  // except it creates a ProfilingUint64Metric.
    44  var MustCreateNewProfilingUint64Metric = MustCreateNewFakeUint64Metric
    45  
    46  // NewProfilingDistributionMetric is equivalent to NewDistributionMetric except
    47  // it creates a ProfilingDistributionMetric.
    48  var NewProfilingDistributionMetric = NewFakeDistributionMetric
    49  
    50  // MustCreateNewProfilingDistributionMetric is equivalent to
    51  // MustCreateNewDistributionMetric except it creates a
    52  // ProfilingDistributionMetric.
    53  var MustCreateNewProfilingDistributionMetric = MustCreateNewFakeDistributionMetric
    54  
    55  // NewProfilingTimerMetric is equivalent to NewTimerMetric except it creates a
    56  // ProfilingTimerMetric.
    57  var NewProfilingTimerMetric = NewFakeTimerMetric
    58  
    59  // MustCreateNewProfilingTimerMetric is equivalent to MustCreateNewTimerMetric
    60  // except it creates a ProfilingTimerMetric.
    61  var MustCreateNewProfilingTimerMetric = MustCreateNewFakeTimerMetric