/// <exception cref="System.IO.IOException"/> public static void VerifyLoginMetrics(long success, int failure) { // Ensure metrics related to kerberos login is updated. MetricsRecordBuilder rb = MetricsAsserts.GetMetrics("UgiMetrics"); if (success > 0) { MetricsAsserts.AssertCounter("LoginSuccessNumOps", success, rb); MetricsAsserts.AssertGaugeGt("LoginSuccessAvgTime", 0, rb); } if (failure > 0) { MetricsAsserts.AssertCounter("LoginFailureNumPos", failure, rb); MetricsAsserts.AssertGaugeGt("LoginFailureAvgTime", 0, rb); } }