Top Description Fields Constructors Methods
org.eclipse.jgit.logging

public Class PerformanceLogContext

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List

Singleton that collects performance logs.
Since
5.10

Field Summary

Modifier and TypeField and Description
private static final ThreadLocal<List<PerformanceLogRecord>>
eventRecords

List that stores events as performance logs.

private static final PerformanceLogContext
INSTANCE

Singleton instance that stores the statistics.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
addEvent(PerformanceLogRecord
performance log record that is going to be added.
record
)

Adds a performance log record to the current list of events.

public void
cleanEvents()

Removes all of the existing records from the current list of events.

public List<PerformanceLogRecord>

Returns:

unmodifiable list of events as performance logs.
getEventRecords
()

Get the unmodifiable list of events as performance records.

public static PerformanceLogContext

Returns:

instance of performance log context.
getInstance
()

Get the instance of the context.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventRecordsback to summary
private static final ThreadLocal<List<PerformanceLogRecord>> eventRecords

List that stores events as performance logs.

INSTANCEback to summary
private static final PerformanceLogContext INSTANCE

Singleton instance that stores the statistics.

Constructor Detail

PerformanceLogContextback to summary
private PerformanceLogContext()

Method Detail

addEventback to summary
public void addEvent(PerformanceLogRecord record)

Adds a performance log record to the current list of events.

Parameters
record:PerformanceLogRecord

performance log record that is going to be added.

cleanEventsback to summary
public void cleanEvents()

Removes all of the existing records from the current list of events.

getEventRecordsback to summary
public List<PerformanceLogRecord> getEventRecords()

Get the unmodifiable list of events as performance records.

Returns:List<PerformanceLogRecord>

unmodifiable list of events as performance logs.

getInstanceback to summary
public static PerformanceLogContext getInstance()

Get the instance of the context.

Returns:PerformanceLogContext

instance of performance log context.