예제 #1
0
    def GetStats(self) -> jobs_pb2.ClientResourcesStats:
        args = hunt_pb2.ApiGetHuntStatsArgs(hunt_id=self.hunt_id)

        response = self._context.SendRequest("GetHuntStats", args)
        if not isinstance(response, hunt_pb2.ApiGetHuntStatsResult):
            raise TypeError(f"Unexpected response type: '{type(response)}'")

        return response.stats
예제 #2
0
 def GetStats(self):
     args = hunt_pb2.ApiGetHuntStatsArgs(hunt_id=self.hunt_id)
     return self._context.SendRequest("GetHuntStats", args).stats