Class MethodSummary
java.lang.Object
ru.vyarus.dropwizard.guice.test.track.stat.MethodSummary
- All Implemented Interfaces:
Comparable<MethodSummary>
Tracked method summary (for all calls of exact method).
- Since:
- 12.02.2025
-
Constructor Summary
ConstructorsConstructorDescriptionMethodSummary(Class<?> service, Method method, com.codahale.metrics.Timer timer) Create summary. -
Method Summary
-
Constructor Details
-
MethodSummary
Create summary.- Parameters:
service- service typemethod- methodtimer- method metrics
-
-
Method Details
-
add
Used during summary object aggregation.- Parameters:
track- track to append to summary
-
getService
- Returns:
- method bean class
-
getMethod
- Returns:
- method itself
-
getTracks
public int getTracks()- Returns:
- registered tracks count
-
getErrors
public int getErrors()- Returns:
- failed calls count
-
getMetrics
public com.codahale.metrics.Snapshot getMetrics()- Returns:
- metrics timer snapshot (for reporting)
-
getMin
- Returns:
- minimal method call duration (string representation)
-
getMax
- Returns:
- maximum method call duration (string representation)
-
getMedian
- Returns:
- median method call duration (string representation)
-
get75thPercentile
In test, the first execution would be slow (jvm warm up). This percentile should show more or less correct (hot) method execution time, in case of many executions (useful for "raw performance" checks).- Returns:
- duration of 75% method calls (string representation)
-
get95thPercentile
- Returns:
- duration of 95% method calls (string representation)
-
getInstancesCount
public int getInstancesCount()- Returns:
- number of different bean instances used for method calls
-
toStringMethod
Method used for console reporting. Return type is not included because the method could be identified by arguments only.- Returns:
- string representation for method (with argument types, but without return type)
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<MethodSummary>
-