public abstract class BaseCoverageRecorder extends CoverageRecorder
| Modifier and Type | Field and Description |
|---|---|
protected Thread |
activeFlusher |
protected String |
alternateRecName |
protected String |
dbName |
protected long |
dbVersion |
protected int |
flushInterval |
protected boolean |
flushNeeded
D indicates whether coverage needs flushing
|
protected long |
lastFlush |
protected String |
recName |
protected Thread |
shutdownFlusher |
protected PerTestRecorder |
testCoverage |
protected boolean |
useAlternate |
protected GlobalRecordingWriteStrategy |
writeStrategy |
DISABLE_SHUTDOWNHOOK_MASK, DISABLE_SLICE_FLUSHING_MASK, FLUSH_INTERVAL_MASK, FLUSHPOLICY_DIRECTED, FLUSHPOLICY_INTERVAL, FLUSHPOLICY_MASK, FLUSHPOLICY_THREADED, USE_CURRENT_THREADGROUP_MASK| Constructor and Description |
|---|
BaseCoverageRecorder(String dbName,
long dbVersion,
long cfgbits,
GlobalRecordingWriteStrategy writeStrategy) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
chooseRecordingName() |
void |
flush() |
void |
flushNeeded() |
void |
forceFlush() |
String |
getDbName() |
long |
getDbVersion() |
String |
getRecordingName() |
Thread |
getShutdownFlusher() |
void |
globalSliceEnd(String runtimeType,
String method,
String runtimeTestName,
int id) |
void |
globalSliceEnd(String runtimeType,
String method,
String runtimeTestName,
int id,
int exitStatus,
Throwable throwable) |
void |
globalSliceStart(String runtimeType,
int id) |
void |
globalSliceStart(String runtimeType,
int id,
long startTime) |
abstract int |
iget(int index) |
abstract void |
inc(int index)
Increment slot at index
|
void |
maybeFlush() |
void |
sliceEnd(String runtimeType,
String method,
String runtimeTestName,
long endTime,
int id,
int rid,
int exitStatus,
ErrorInfo ei) |
void |
sliceStart(String runtimeType,
long ts,
int id,
int rid) |
void |
startRun() |
protected abstract String |
write()
Writes coverage data to disk
|
protected String |
write(int[][] hits,
int elementCount) |
compareCoverageWith, createEmptyHitsMask, getConfigBits, getCoverageSnapshot, rethrow, withCapacityForprotected boolean flushNeeded
protected long lastFlush
protected int flushInterval
protected boolean useAlternate
protected Thread shutdownFlusher
protected Thread activeFlusher
protected final long dbVersion
protected final String dbName
protected final String recName
protected final String alternateRecName
protected final PerTestRecorder testCoverage
protected final GlobalRecordingWriteStrategy writeStrategy
public BaseCoverageRecorder(String dbName, long dbVersion, long cfgbits, GlobalRecordingWriteStrategy writeStrategy)
protected String chooseRecordingName()
protected String write(int[][] hits, int elementCount) throws IOException
IOExceptionpublic final void globalSliceStart(String runtimeType, int id)
globalSliceStart in class CoverageRecorderpublic final void globalSliceStart(String runtimeType, int id, long startTime)
globalSliceStart in class CoverageRecorderpublic void globalSliceEnd(String runtimeType, String method, String runtimeTestName, int id)
globalSliceEnd in class CoverageRecorderpublic final void globalSliceEnd(String runtimeType, String method, String runtimeTestName, int id, int exitStatus, Throwable throwable)
globalSliceEnd in class CoverageRecorderpublic void startRun()
startRun in class CoverageRecorderpublic String getRecordingName()
getRecordingName in class CoverageRecorderpublic long getDbVersion()
getDbVersion in class CoverageRecorderpublic String getDbName()
getDbName in class CoverageRecorderpublic Thread getShutdownFlusher()
public void flushNeeded()
flushNeeded in class CoverageRecorderpublic void maybeFlush()
maybeFlush in class CoverageRecorderpublic void forceFlush()
forceFlush in class CoverageRecorderpublic void flush()
flush in class CoverageRecorderpublic void sliceStart(String runtimeType, long ts, int id, int rid)
sliceStart in class CoverageRecorderpublic void sliceEnd(String runtimeType, String method, String runtimeTestName, long endTime, int id, int rid, int exitStatus, ErrorInfo ei)
sliceEnd in class CoverageRecorderruntimeType - the runtime type of the slicemethod - the qualified method nameruntimeTestName - name of the test (at runtime) or null if unknownendTime - timestamp for the flushid - the method id of the slicerid - the run id of the sliceexitStatus - == -1 if no result was recorded, 0 if abnormal exit, 1 if normal exitei - An ErrorInfo for any RuntimeException or Error thrown (if any, otherwise null)protected abstract String write() throws IOException
IOExceptionpublic abstract void inc(int index)
inc in class CoverageRecorderpublic abstract int iget(int index)
iget in class CoverageRecorderCopyright © 2023 OpenClover.org. All rights reserved.