proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
EchoStats.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
EchoService
{
13
19
class
EchoStats
{
20
public
:
21
virtual
~EchoStats
() {
22
}
23
24
// NOTE: We make the following methods `virtual` so that we can
25
// mock them using Gmock for our C++ unit-tests. EchoStats
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
}
EchoService
Definition:
EchoHandler.cpp:19
EchoService::EchoStats::recordRequest
virtual void recordRequest()
Definition:
EchoStats.h:29
EchoService::EchoStats::~EchoStats
virtual ~EchoStats()
Definition:
EchoStats.h:21
EchoService::EchoStats::getRequestCount
virtual uint64_t getRequestCount()
Definition:
EchoStats.h:33
EchoService::EchoStats
Definition:
EchoStats.h:19
EchoService::EchoStats::reqCount_
uint64_t reqCount_
Definition:
EchoStats.h:38
uint64_t
uint64_t
Definition:
ConstexprMathBenchmark.cpp:190
proxygen
httpserver
samples
echo
EchoStats.h
Generated by
1.8.11