blob: 290e7e75743b85e5c1ee5a6eb43cf80f233f4cfe [file] [log] [blame]
Avi Drissman8ba1bad2022-09-13 19:22:361// Copyright 2014 The Chromium Authors
[email protected]62ca95c2014-04-24 16:48:302// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file contains a set of histogram support functions for logging behavior
6// seen while loading NaCl plugins.
7
jvoung0ecfdd572015-04-02 16:49:318#ifndef COMPONENTS_NACL_RENDERER_HISTOGRAM_H_
9#define COMPONENTS_NACL_RENDERER_HISTOGRAM_H_
10
avi26062922015-12-26 00:14:1811#include <stdint.h>
12
[email protected]62ca95c2014-04-24 16:48:3013#include <string>
14#include "base/time/time.h"
mseaborn3cf62d92015-02-10 21:20:0115#include "components/nacl/renderer/ppb_nacl_private.h"
[email protected]62ca95c2014-04-24 16:48:3016
17namespace nacl {
18
19void HistogramCustomCounts(const std::string& name,
20 int32_t sample,
21 int32_t min,
22 int32_t max,
23 uint32_t bucket_count);
24
25void HistogramEnumerate(const std::string& name,
26 int32_t sample,
27 int32_t boundary_value);
28
29void HistogramEnumerateLoadStatus(PP_NaClError error_code,
30 bool is_installed);
31
32void HistogramEnumerateOsArch(const std::string& sandbox_isa);
33
34// Records values up to 20 seconds.
35void HistogramTimeSmall(const std::string& name, int64_t sample);
36// Records values up to 3 minutes, 20 seconds.
37void HistogramTimeMedium(const std::string& name, int64_t sample);
38// Records values up to 33 minutes.
39void HistogramTimeLarge(const std::string& name, int64_t sample);
[email protected]468953b2014-06-13 19:40:4340// Records values up to 12 minutes.
41void HistogramTimeTranslation(const std::string& name, int64_t sample_ms);
[email protected]62ca95c2014-04-24 16:48:3042
43void HistogramStartupTimeSmall(const std::string& name,
44 base::TimeDelta td,
45 int64_t nexe_size);
46void HistogramStartupTimeMedium(const std::string& name,
47 base::TimeDelta td,
48 int64_t nexe_size);
49void HistogramSizeKB(const std::string& name, int32_t sample);
50void HistogramHTTPStatusCode(const std::string& name, int32_t status);
51void HistogramEnumerateManifestIsDataURI(bool is_data_uri);
[email protected]468953b2014-06-13 19:40:4352void HistogramKBPerSec(const std::string& name, int64_t kb, int64_t us);
jvoung0ecfdd572015-04-02 16:49:3153void HistogramRatio(const std::string& name,
54 int64_t numerator,
55 int64_t denominator);
[email protected]62ca95c2014-04-24 16:48:3056
57} // namespace nacl
jvoung0ecfdd572015-04-02 16:49:3158
59#endif // COMPONENTS_NACL_RENDERER_HISTOGRAM_H_