mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
a7246e9781
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
33 lines
873 B
C++
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;
|
|
}
|
|
};
|
|
}}
|