Class AddressPenaltiesTraceReader
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.simulator.parser.AbstractTraceReader
-
- com.github.benmanes.caffeine.cache.simulator.parser.TextTraceReader
-
- com.github.benmanes.caffeine.cache.simulator.parser.address.penalties.AddressPenaltiesTraceReader
-
- All Implemented Interfaces:
TraceReader
public final class AddressPenaltiesTraceReader extends TextTraceReader
An extension toAddressTraceReaderwhere the trace files were augmented to include hit and miss penalties.Example line in this format: s 0x1fffff50 1 200 1200
The description of each part of the line by order from left to right:
- Access Type: A single character indicating whether the access is a load (l) or a store (s).
- Address: A 32-bit integer (in unsigned hexadecimal format) specifying the memory address that is being accessed. For example, 0xff32e100 specifies that memory address 4281524480 is accessed.
- Instructions since last memory access: Indicates the number of instructions of any type that executed between since the last memory access (i.e. the one on the previous line in the trace). For example, if the 5th and 10th instructions in the program's execution are loads, and there are no memory operations between them, then the trace line for with the second load has 4 for this field.
- Hit penalty: Indicates the hit penalty, the time took to handle the request when it was in the cache.
- Miss penalty: Indicates the miss penalty, the time took to handle the request when it wasn't in the cache.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.benmanes.caffeine.cache.simulator.parser.TraceReader
TraceReader.KeyOnlyTraceReader
-
-
Field Summary
-
Fields inherited from class com.github.benmanes.caffeine.cache.simulator.parser.AbstractTraceReader
filePath
-
-
Constructor Summary
Constructors Constructor Description AddressPenaltiesTraceReader(String filePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Policy.Characteristic>characteristics()The event features that this trace supports.Stream<AccessEvent>events()Creates a stream that lazily reads the trace source.-
Methods inherited from class com.github.benmanes.caffeine.cache.simulator.parser.TextTraceReader
lines
-
Methods inherited from class com.github.benmanes.caffeine.cache.simulator.parser.AbstractTraceReader
readFile, readInput
-
-
-
-
Constructor Detail
-
AddressPenaltiesTraceReader
public AddressPenaltiesTraceReader(String filePath)
-
-
Method Detail
-
characteristics
public Set<Policy.Characteristic> characteristics()
Description copied from interface:TraceReaderThe event features that this trace supports.
-
events
public Stream<AccessEvent> events()
Description copied from interface:TraceReaderCreates a stream that lazily reads the trace source.If timely disposal of underlying resources is required, the try-with-resources construct should be used to ensure that the stream's
closemethod is invoked after the stream operations are completed.- Returns:
- a lazy stream of cache events
-
-