84 |
if (breaker instanceof AccountingCircuitBreaker) { |
if (breaker instanceof AccountingCircuitBreaker) { |
85 |
AccountingCircuitBreaker acb = (AccountingCircuitBreaker) breaker; |
AccountingCircuitBreaker acb = (AccountingCircuitBreaker) breaker; |
86 |
|
|
|
double failure_percentage = ((double) acb.getTotalFailureCount()*100) / ((double) acb.getTotalCallCount() ); |
|
87 |
StringBuilder sbf = new StringBuilder(); |
StringBuilder sbf = new StringBuilder(); |
88 |
Formatter formatter = new Formatter(sb); |
if (acb.getTotalCallCount() > 0) { |
89 |
formatter.format("%.2f", failure_percentage); |
double failure_percentage = ((double) acb.getTotalFailureCount()*100) / ((double) acb.getTotalCallCount() ); |
90 |
|
Formatter formatter = new Formatter(sbf); |
91 |
|
formatter.format("%.2f", failure_percentage); |
92 |
|
} else { |
93 |
|
sbf.append("0.0"); |
94 |
|
} |
95 |
|
|
96 |
|
|
97 |
sb.append("<tr><th colspan=\"2\">Accounting</th></tr>\n"); |
sb.append("<tr><th colspan=\"2\">Accounting</th></tr>\n"); |