Implement the gRPC APIs for the job stats

Add the job stats APIs in the rdc_api_service at the server side rdcd
Add the job stats APIs for the RdcStandaloneHandler at the client side
Make the load librdc.so and librdc_client.so thread safe.
Impelement async update all fields in RdcEmbeddedHandler.

Change-Id: I659d91efb32d1094d3b7f0f2cec39518cd7336ce
This commit is contained in:
Bill(Shuzhou) Liu
2020-04-15 12:20:22 -04:00
committed by Chris Freehill
parent a547dc7efd
commit fe3e75edfa
13 changed files with 495 additions and 66 deletions
+22
View File
@@ -100,7 +100,29 @@ class RdcAPIServiceImpl final : public ::rdc::RdcAPI::Service {
::rdc::UpdateAllFieldsResponse* reply) override;
::grpc::Status StartJobStats(::grpc::ServerContext* context,
const ::rdc::StartJobStatsRequest* request,
::rdc::StartJobStatsResponse* reply) override;
::grpc::Status GetJobStats(::grpc::ServerContext* context,
const ::rdc::GetJobStatsRequest* request,
::rdc::GetJobStatsResponse* reply) override;
::grpc::Status StopJobStats(::grpc::ServerContext* context,
const ::rdc::StopJobStatsRequest* request,
::rdc::StopJobStatsResponse* reply) override;
::grpc::Status RemoveJob(::grpc::ServerContext* context,
const ::rdc::RemoveJobRequest* request,
::rdc::RemoveJobResponse* reply) override;
::grpc::Status RemoveAllJob(::grpc::ServerContext* context,
const ::rdc::Empty* request,
::rdc::RemoveAllJobResponse* reply) override;
private:
bool copy_gpu_usage_info(const rdc_gpu_usage_info_t& src,
::rdc::GpuUsageInfo* target);
rdc_handle_t rdc_handle_;
};