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:
committed by
Chris Freehill
parent
a547dc7efd
commit
fe3e75edfa
@@ -22,6 +22,7 @@ THE SOFTWARE.
|
||||
#ifndef RDC_LIB_IMPL_RDCEMBEDDEDHANDLER_H_
|
||||
#define RDC_LIB_IMPL_RDCEMBEDDEDHANDLER_H_
|
||||
|
||||
#include <future> // NOLINT(build/c++11)
|
||||
#include "rdc_lib/RdcHandler.h"
|
||||
#include "rdc_lib/RdcGroupSettings.h"
|
||||
#include "rdc_lib/RdcMetricFetcher.h"
|
||||
@@ -96,6 +97,7 @@ class RdcEmbeddedHandler: public RdcHandler {
|
||||
RdcMetricFetcherPtr metric_fetcher_;
|
||||
RdcWatchTablePtr watch_table_;
|
||||
RdcMetricsUpdaterPtr metrics_updater_;
|
||||
std::future<void> updater_;
|
||||
};
|
||||
|
||||
} // namespace rdc
|
||||
|
||||
@@ -90,6 +90,11 @@ class RdcStandaloneHandler: public RdcHandler {
|
||||
private:
|
||||
// Helper function to handle the error
|
||||
rdc_status_t error_handle(::grpc::Status status, uint32_t rdc_status);
|
||||
|
||||
bool copy_gpu_usage_info(
|
||||
const ::rdc::GpuUsageInfo& src,
|
||||
rdc_gpu_usage_info_t* target);
|
||||
|
||||
std::unique_ptr<::rdc::RdcAPI::Stub> stub_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user