proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ProxyStats.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-present, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
*/
10
#pragma once
11
12
namespace
ProxyService
{
13
19
class
ProxyStats
{
20
public
:
21
virtual
~ProxyStats
() {
22
}
23
24
// NOTE: We make the following methods `virtual` so that we can
25
// mock them using Gmock for our C++ unit-tests. ProxyStats
26
// is an external dependency to handler and we should be
27
// able to mock it.
28
29
virtual
void
recordRequest
() {
30
++
reqCount_
;
31
}
32
33
virtual
uint64_t
getRequestCount
() {
34
return
reqCount_
;
35
}
36
37
private
:
38
uint64_t
reqCount_
{0};
39
};
40
41
}
ProxyService::ProxyStats
Definition:
ProxyStats.h:19
ProxyService
Definition:
ProxyHandler.cpp:37
ProxyService::ProxyStats::~ProxyStats
virtual ~ProxyStats()
Definition:
ProxyStats.h:21
ProxyService::ProxyStats::recordRequest
virtual void recordRequest()
Definition:
ProxyStats.h:29
ProxyService::ProxyStats::getRequestCount
virtual uint64_t getRequestCount()
Definition:
ProxyStats.h:33
uint64_t
uint64_t
Definition:
ConstexprMathBenchmark.cpp:190
ProxyService::ProxyStats::reqCount_
uint64_t reqCount_
Definition:
ProxyStats.h:38
proxygen
httpserver
samples
proxy
ProxyStats.h
Generated by
1.8.11