sapling/common/stats/MonotonicCounter.h
Jasmeet Bagga a7246e9781 Factor our hw_port_stats_fb303 lib
Summary:
Implementation based on what we do in bcm layer
for reporting (non histogram) port stat counters. Abstracting
this lib out so we can reuse this code in both SAI and bcm
layers. Plus pulling this out of BcmPort makes it much
easier to unit test this code.

Reviewed By: boryas

Differential Revision: D19676641

fbshipit-source-id: 88aa20f20339729f5387500bcf6084871f4e7caa
2020-02-03 17:37:05 -08:00

33 lines
873 B
C++

/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <fb303/ExportedHistogramMap.h>
#include <fb303/ExportedHistogramMapImpl.h>
#include <fb303/ExportedStatMapImpl.h>
#include <folly/Range.h>
namespace facebook { namespace stats {
class MonotonicCounter {
public:
MonotonicCounter(folly::StringPiece, fb303::ExportType, fb303::ExportType) {}
void updateValue(std::chrono::seconds, int64_t) {}
void swap(MonotonicCounter& counter) {}
int64_t get() const {
return 0;
}
const std::string& getName() const {
static const std::string kName;
return kName;
}
};
}}