Classes | |
| class | ThreadRecords |
| Class to represent each thread's bucket of records. More... | |
Public Member Functions | |
| TraceMerger (HighLevelPDM pdm) throws IOException | |
| Create a new trace record merger for the given PDM. | |
| IntervalRecord | getNextInterval () throws IOException |
| Returns the next record across all threads. | |
Static Public Member Functions | |
| static void | main (String[] args) throws IOException |
| test harness | |
Package Attributes | |
| int | threads |
| HighLevelPDM | pdm |
| ThreadRecords[] | threadRecs |
Static Package Attributes | |
| static final int | CHUNKS = 64 |
| Number of records to read in at once, per thread. | |
It is basically an on-line merge.
As with the TraceIntervalReader, do not use the underlying raw trace record accesses of the HighLevelPDM unless you want this to break.
| IntervalRecord edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.getNextInterval | ( | ) | throws IOException |
Returns the next record across all threads.
If no more are available, this returns null.
TODO: This could be improved a lot by using a min heap instead of a dumb linear search.
References edu.ufl.hcs.ppw.pdm.highlevel.IntervalRecord.getEndRecord(), edu.ufl.hcs.ppw.pdm.TraceRecord.getTimestamp(), edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.TraceMerger.ThreadRecords.peekNextInterval(), and edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.TraceMerger.ThreadRecords.popNextInterval().
Referenced by edu.ufl.hcs.ppw.exports.SLOG2TraceConverter.convert(), and edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.main().
final int edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.CHUNKS = 64 [static, package] |
Number of records to read in at once, per thread.
This is an important parameter; larger values reduce costly disk seeks, but take up more memory (especially with a large number of threads).
Referenced by edu.ufl.hcs.ppw.pdm.highlevel.TraceMerger.TraceMerger.ThreadRecords.fillIfNecessary().
1.5.8