summaryrefslogtreecommitdiffstats
path: root/remoting/client/chromoting_stats.h
blob: da7601b7f9222d3026fe768713db067a8a4c0b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// ChromotingStats defines a bundle of performance counters and statistics
// for chromoting.

#ifndef REMOTING_CLIENT_CHROMOTING_STATS_H_
#define REMOTING_CLIENT_CHROMOTING_STATS_H_

#include "remoting/base/rate_counter.h"
#include "remoting/base/running_average.h"

namespace remoting {

class ChromotingStats {
 public:
  ChromotingStats();
  virtual ~ChromotingStats();

  RateCounter* video_bandwidth() { return &video_bandwidth_; }
  RateCounter* video_frame_rate() { return &video_frame_rate_; }
  RunningAverage* video_capture_ms() { return &video_capture_ms_; }
  RunningAverage* video_encode_ms() { return &video_encode_ms_; }
  RunningAverage* video_decode_ms() { return &video_decode_ms_; }
  RunningAverage* video_paint_ms() { return &video_paint_ms_; }
  RunningAverage* round_trip_ms() { return &round_trip_ms_; }

 private:
  RateCounter video_bandwidth_;
  RateCounter video_frame_rate_;
  RunningAverage video_capture_ms_;
  RunningAverage video_encode_ms_;
  RunningAverage video_decode_ms_;
  RunningAverage video_paint_ms_;
  RunningAverage round_trip_ms_;

  DISALLOW_COPY_AND_ASSIGN(ChromotingStats);
};

}  // namespace remoting

#endif  // REMOTING_CLIENT_CHROMOTING_STATS_H_