summaryrefslogtreecommitdiffstats
path: root/chrome/common/resource_usage_reporter.mojom
blob: 95732960ec0ef6171a1fd2a26493804a28804c56 (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
// Copyright 2015 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.

// Mirror of blink::WebCache::ResourceTypeStat.
// Note: These are size_t in blink.
struct ResourceTypeStat {
  uint64 count = 0;
  uint64 size = 0;
  uint64 live_size = 0;
  uint64 decoded_size = 0;
};

// Blink resource cache statistics. Mirror of
// blink::WebCache::ResourceTypeStats.
struct ResourceTypeStats {
  ResourceTypeStat images;
  ResourceTypeStat css_style_sheets;
  ResourceTypeStat scripts;
  ResourceTypeStat xsl_style_sheets;
  ResourceTypeStat fonts;
  ResourceTypeStat other;
};

struct ResourceUsageData {
  // V8 memory usage information.
  // NOTE: For utility processes, this only reports V8 memory used by the proxy
  // resolver.
  bool reports_v8_stats = false;
  uint64 v8_bytes_allocated = 0;
  uint64 v8_bytes_used = 0;

  // Blink cache information.
  ResourceTypeStats? web_cache_stats;
};

interface ResourceUsageReporter {
  GetUsageData() => (ResourceUsageData data);
};