Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / components / nacl / renderer / histogram.h
blobde8c6da5e7d49d0255456a0a5fd2069f12591814
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 #include <string>
9 #include "base/time/time.h"
10 #include "ppapi/c/private/ppb_nacl_private.h"
12 namespace nacl {
14 void HistogramCustomCounts(const std::string& name,
15 int32_t sample,
16 int32_t min,
17 int32_t max,
18 uint32_t bucket_count);
20 void HistogramEnumerate(const std::string& name,
21 int32_t sample,
22 int32_t boundary_value);
24 void HistogramEnumerateLoadStatus(PP_NaClError error_code,
25 bool is_installed);
27 void HistogramEnumerateOsArch(const std::string& sandbox_isa);
29 // Records values up to 20 seconds.
30 void HistogramTimeSmall(const std::string& name, int64_t sample);
31 // Records values up to 3 minutes, 20 seconds.
32 void HistogramTimeMedium(const std::string& name, int64_t sample);
33 // Records values up to 33 minutes.
34 void HistogramTimeLarge(const std::string& name, int64_t sample);
35 // Records values up to 12 minutes.
36 void HistogramTimeTranslation(const std::string& name, int64_t sample_ms);
38 void HistogramStartupTimeSmall(const std::string& name,
39 base::TimeDelta td,
40 int64_t nexe_size);
41 void HistogramStartupTimeMedium(const std::string& name,
42 base::TimeDelta td,
43 int64_t nexe_size);
44 void HistogramSizeKB(const std::string& name, int32_t sample);
45 void HistogramHTTPStatusCode(const std::string& name, int32_t status);
46 void HistogramEnumerateManifestIsDataURI(bool is_data_uri);
47 void HistogramKBPerSec(const std::string& name, int64_t kb, int64_t us);
49 } // namespace nacl