QUIC - cleanup changes to sync chromium tree with internal source.
[chromium-blink-merge.git] / components / nacl / renderer / histogram.h
bloba9ae82f08272a1d78a38d9bffbc261c66d261883
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains a set of histogram support functions for logging behavior
6 // seen while loading NaCl plugins.
8 #ifndef COMPONENTS_NACL_RENDERER_HISTOGRAM_H_
9 #define COMPONENTS_NACL_RENDERER_HISTOGRAM_H_
11 #include <string>
12 #include "base/time/time.h"
13 #include "components/nacl/renderer/ppb_nacl_private.h"
15 namespace nacl {
17 void HistogramCustomCounts(const std::string& name,
18 int32_t sample,
19 int32_t min,
20 int32_t max,
21 uint32_t bucket_count);
23 void HistogramEnumerate(const std::string& name,
24 int32_t sample,
25 int32_t boundary_value);
27 void HistogramEnumerateLoadStatus(PP_NaClError error_code,
28 bool is_installed);
30 void HistogramEnumerateOsArch(const std::string& sandbox_isa);
32 // Records values up to 20 seconds.
33 void HistogramTimeSmall(const std::string& name, int64_t sample);
34 // Records values up to 3 minutes, 20 seconds.
35 void HistogramTimeMedium(const std::string& name, int64_t sample);
36 // Records values up to 33 minutes.
37 void HistogramTimeLarge(const std::string& name, int64_t sample);
38 // Records values up to 12 minutes.
39 void HistogramTimeTranslation(const std::string& name, int64_t sample_ms);
41 void HistogramStartupTimeSmall(const std::string& name,
42 base::TimeDelta td,
43 int64_t nexe_size);
44 void HistogramStartupTimeMedium(const std::string& name,
45 base::TimeDelta td,
46 int64_t nexe_size);
47 void HistogramSizeKB(const std::string& name, int32_t sample);
48 void HistogramHTTPStatusCode(const std::string& name, int32_t status);
49 void HistogramEnumerateManifestIsDataURI(bool is_data_uri);
50 void HistogramKBPerSec(const std::string& name, int64_t kb, int64_t us);
51 void HistogramRatio(const std::string& name,
52 int64_t numerator,
53 int64_t denominator);
55 } // namespace nacl
57 #endif // COMPONENTS_NACL_RENDERER_HISTOGRAM_H_