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_
12 #include "base/time/time.h"
13 #include "components/nacl/renderer/ppb_nacl_private.h"
17 void HistogramCustomCounts(const std::string
& name
,
21 uint32_t bucket_count
);
23 void HistogramEnumerate(const std::string
& name
,
25 int32_t boundary_value
);
27 void HistogramEnumerateLoadStatus(PP_NaClError error_code
,
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
,
44 void HistogramStartupTimeMedium(const std::string
& name
,
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
,
57 #endif // COMPONENTS_NACL_RENDERER_HISTOGRAM_H_