syntax = "proto3";

import "google/protobuf/empty.proto";

service Profiling {
  rpc Start(StartProfilingRequest) returns (ProfilingResponse) {};
  rpc State(google.protobuf.Empty) returns (ProfilingResponse) {};
  rpc Stop(google.protobuf.Empty) returns (ProfilingResponse) {};
  rpc DumpThreads(google.protobuf.Empty) returns (String) {};
}

message StartProfilingRequest {
  int64 duration = 1;
}

message ProfilingResponse {
  string status = 1;
  double stop_in = 2;
  string error = 3;
  string pstats_file = 4;
}

message String {
  string str = 1;
}