Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Fixed ResourceUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
Defelo committed Mar 5, 2022
1 parent 79f36eb commit 24f19e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions PyCrypCli/game_objects/resource_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
class ResourceUsage(GameObject):
@property
def cpu(self) -> float:
return self._data.get("cpu")
return min(1, self._data["usage_cpu"] / self._data["performance_cpu"])

@property
def ram(self) -> float:
return self._data.get("ram")
return min(1, self._data["usage_ram"] / self._data["performance_ram"])

@property
def gpu(self) -> float:
return self._data.get("gpu")
return min(1, self._data["usage_gpu"] / self._data["performance_gpu"])

@property
def disk(self) -> float:
return self._data.get("disk")
return min(1, self._data["usage_disk"] / self._data["performance_disk"])

@property
def network(self) -> float:
return self._data.get("network")
return min(1, self._data["usage_network"] / self._data["performance_network"])

0 comments on commit 24f19e0

Please sign in to comment.