• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2021 Huawei Device Co., Ltd.
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6//     http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14syntax = "proto3";
15
16option java_package = "ohos.devtools.datasources.transport.grpc.service";
17
18import "profiler_service_types.proto";
19
20// RPC interface between profiler service and host service
21// Use protobuf plug-ins to convert proto define to
22// source and header files during the build process.
23service IProfilerService {
24    // get all plugin infos and capabilities.
25    rpc GetCapabilities(GetCapabilitiesRequest) returns (GetCapabilitiesResponse);
26
27    // create tracing sesion and pass tracing config to plugins.
28    rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse);
29
30    // start tracing session, active server side tracing triggers.
31    rpc StartSession(StartSessionRequest) returns (StartSessionResponse);
32
33    // get server-side cached tracing data since current session started.
34    rpc FetchData(FetchDataRequest) returns (stream FetchDataResponse);
35
36    // stop tracing session, deactivate server side tracing triggers.
37    rpc StopSession(StopSessionRequest) returns (StopSessionResponse);
38
39    // destroy tracing session.
40    rpc DestroySession(DestroySessionRequest) returns (DestroySessionResponse);
41
42    // keep tracing session alive, call this interface will restart session expire count down task.
43    rpc KeepSession(KeepSessionRequest) returns (KeepSessionResponse);
44}
45