Package org.eclipse.jgit.logging
Class PerformanceLogContext
java.lang.Object
org.eclipse.jgit.logging.PerformanceLogContext
Singleton that collects performance logs.
- Since:
- 5.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadLocal
<List<PerformanceLogRecord>> List that stores events as performance logs.private static final PerformanceLogContext
Singleton instance that stores the statistics. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEvent
(PerformanceLogRecord record) Adds a performance log record to the current list of events.void
Removes all of the existing records from the current list of events.Get the unmodifiable list of events as performance records.static PerformanceLogContext
Get the instance of the context.
-
Field Details
-
INSTANCE
Singleton instance that stores the statistics. -
eventRecords
List that stores events as performance logs.
-
-
Constructor Details
-
PerformanceLogContext
private PerformanceLogContext()
-
-
Method Details
-
getInstance
Get the instance of the context.- Returns:
- instance of performance log context.
-
getEventRecords
Get the unmodifiable list of events as performance records.- Returns:
- unmodifiable list of events as performance logs.
-
addEvent
Adds a performance log record to the current list of events.- Parameters:
record
- performance log record that is going to be added.
-
cleanEvents
public void cleanEvents()Removes all of the existing records from the current list of events.
-