Class NailStats
java.lang.Object
com.martiansoftware.nailgun.NailStats
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a copy of thisNailStatsobject.booleanReturns true iff the specifiedNailStatsobject is tracking the same class.Returns the class for which we're tracking statisticslongReturns the number of sessions currently running this nail.longReturns the number of times this nail has been run.inthashCode()(package private) voidLogs the fact that an instance of this nail has finished(package private) voidLogs the fact that an instance of this nail has startedtoString()Returns a String representation of thisNailStatsobject, in the form "classname: runcount/refcount".
-
Field Details
-
nailclass
-
runCounter
private long runCounter -
refCounter
private long refCounter -
lock
-
-
Constructor Details
-
NailStats
NailStats(Class nailclass) Creates a new NailStats object for the specified class- Parameters:
nailclass- the class for which we'll collect statistics
-
-
Method Details
-
nailStarted
void nailStarted()Logs the fact that an instance of this nail has started -
nailFinished
void nailFinished()Logs the fact that an instance of this nail has finished -
getRunCount
public long getRunCount()Returns the number of times this nail has been run. Nails that have started but not yet finished are included in this number.- Returns:
- the number of times this nail has been run.
-
getRefCount
public long getRefCount()Returns the number of sessions currently running this nail.- Returns:
- the number of sessions currently running this nail.
-
getNailClass
Returns the class for which we're tracking statistics- Returns:
- the class for which we're tracking statistics
-
hashCode
-
equals
-
clone
-
toString
-