blob: 26421c4fc01608aa6308f34e6555fa4b94347c68 [file] [log] [blame]
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
package profiler.proto;
import "io.proto";
service InternalIoService {
rpc TrackIoSessionStart(IoSessionStartRequest) returns (EmptyIoReply) {}
rpc TrackIoCall(IoCallRequest) returns (EmptyIoReply) {}
rpc TrackIoSessionEnd(IoSessionEndRequest) returns (EmptyIoReply) {}
}
// Tracks an I/O call either reading or writing. Contains info about
// number of bytes read or written, timestamp when the reading or
// writing started and the timestamp when it ended.
message IoCallRequest {
int32 process_id = 1;
int64 io_session_id = 2;
IoType type = 3;
int32 bytes_count = 4;
int64 start_timestamp = 5;
int64 end_timestamp = 6;
}
// Tracks an I/O session starting. Contains info about the path of the file
// read from or written to, and the timestamp when the
// session started.
message IoSessionStartRequest {
int32 process_id = 1;
int64 io_session_id = 2;
string file_path = 3;
int64 timestamp = 4;
}
// Tracks an I/O session ending.
// Contains the timestamp when the session ended.
message IoSessionEndRequest {
int32 process_id = 1;
int64 io_session_id = 2;
int64 timestamp = 3;
}
message EmptyIoReply {}