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