proxygen
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 
34  return reqCount_;
35  }
36 
37  private:
39 };
40 
41 }
virtual void recordRequest()
Definition: EchoStats.h:29
virtual ~EchoStats()
Definition: EchoStats.h:21
virtual uint64_t getRequestCount()
Definition: EchoStats.h:33