xref: /aosp_15_r20/prebuilts/android-emulator/linux-x86_64/lib/emulator_stats.proto (revision d870e0501505f2fc9999364ffe386a6b6151adc1)
1// Copyright (C) 2023 The Android Open Source Project
2//
3// Licensed under the Apache License= ; Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing= ; software
10// distributed under the License is distributed on an "AS IS" BASIS= ;
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND= ; either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Note that if you add/remove methods in this file you must update
16// the metrics sql as well ./android/scripts/gen-grpc-sql.py
17//
18// Please group deleted methods in a block including the date (MM/DD/YY)
19// it was removed. This enables us to easily keep metrics around after removal
20//
21// List of deleted methods
22// rpc iWasDeleted (03/12/12)
23// ...
24syntax = "proto3";
25
26option java_multiple_files = true;
27option java_package = "com.android.emulation.stats";
28
29package android.emulation.stats;
30import "google/protobuf/empty.proto";
31import "google/protobuf/wrappers.proto";
32
33// A Stats service allows you to query emulator's
34// runtime information including memory usage, CPU usage
35// and etc.
36
37service EmulatorStats {
38    // Returns the current memory usage of the emulator instance.
39    rpc getMemoryUsage(google.protobuf.Empty) returns (MemoryUsage) {}
40}
41
42// RAM usage info for the emulator in bytes
43message MemoryUsage {
44    optional uint64 resident_memory = 1;
45    optional uint64 resident_memory_max = 2;
46    optional uint64 virtual_memory = 3;
47    optional uint64 virtual_memory_max = 4;
48    optional uint64 total_phys_memory = 5;
49    optional uint64 total_page_file = 6;
50    optional uint64 total_guest_memory = 7;
51}
52