diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-10 11:05:11 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-10 12:14:50 +0200 |
| commit | 6c896a4a29147a863d797ac5bd5a210d4a9a78ef (patch) | |
| tree | 709b59fba85ec90a1526cf150ab8703141a30901 /opendc-compute/opendc-compute-service/src | |
| parent | d889a41487c1312ed11deb7e88f0214ac057727c (diff) | |
fix(compute/service): Expose number of registered servers
This change updates the compute service telemetry to also expose the
number of servers that are registered with the service.
Diffstat (limited to 'opendc-compute/opendc-compute-service/src')
2 files changed, 3 insertions, 0 deletions
diff --git a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt index caa95e09..0fe016aa 100644 --- a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt +++ b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt @@ -295,6 +295,7 @@ internal class ComputeServiceImpl( _attemptsSuccess, _attemptsFailure, _attemptsError, + servers.size, _serversPending, _serversActive ) diff --git a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/telemetry/SchedulerStats.kt b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/telemetry/SchedulerStats.kt index 4dc70286..6e9f458a 100644 --- a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/telemetry/SchedulerStats.kt +++ b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/telemetry/SchedulerStats.kt @@ -32,6 +32,7 @@ import org.opendc.compute.service.ComputeService * @property attemptsSuccess Scheduling attempts that resulted into an allocation onto a host. * @property attemptsFailure The number of failed scheduling attempt due to insufficient capacity at the moment. * @property attemptsError The number of scheduling attempts that failed due to system error. + * @property serversTotal The number of servers registered with the service. * @property serversPending The number of servers that are pending to be scheduled. * @property serversActive The number of servers that are currently managed by the service and running. */ @@ -41,6 +42,7 @@ public data class SchedulerStats( val attemptsSuccess: Long, val attemptsFailure: Long, val attemptsError: Long, + val serversTotal: Int, val serversPending: Int, val serversActive: Int ) |
