Package org.jenkinsci.plugins.cloudstats
Class Health
- java.lang.Object
-
- org.jenkinsci.plugins.cloudstats.Health
-
public final class Health extends Object
Health metric for a series of provisioning attempts.The actual statistics approach is left to the implementation and can be changed freely to fit provisioning reporting and decision making. Use cases:
- Report that particular cloud/template has its success rate low so it might require attention. (
getOverall()
) - Provide data so plugins can pick the more successful cloud/template to fulfil the request. (getCurrent()
)- Author:
- ogondza.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Health.Report
-
Constructor Summary
Constructors Constructor Description Health(Collection<ProvisioningActivity> samples)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Health.Report
getCurrent()
Get projected probability the next provisioning attempt will succeed.long
getNumSamples()
Health.Report
getOverall()
Get Overall success rate of the series.
-
-
-
Constructor Detail
-
Health
public Health(@NonNull Collection<ProvisioningActivity> samples)
-
-
Method Detail
-
getOverall
public Health.Report getOverall()
Get Overall success rate of the series.
-
getCurrent
public Health.Report getCurrent()
Get projected probability the next provisioning attempt will succeed.Caution: There is a black magic involved.
This implementation computes exponential average adjusting exponent based on the age of the data. This is to give more wight to data that ware observed recently compared to older ones.
-
getNumSamples
public long getNumSamples()
-
-