public override MajorFlushEvent BeginFileFlush(PageSwapper swapper) { string fileName = swapper.File().Name; _log.info(format("Flushing file: '%s'.", fileName)); return(new FileFlushEvent(this, fileName, _flushedPages.get(), _flushBytesWritten.get(), _clock.nanos())); }
public override FlushEvent BeginFlush(long filePageId, long cachePageId, PageSwapper swapper) { long now = outerInstance.clock.Nanos(); long opportunityIntervalNanos = now - LastReportingTime; if (TimeUnit.NANOSECONDS.toSeconds(opportunityIntervalNanos) > _speedReportingTimeThreshold) { long writtenBytes = outerInstance.flushBytesWritten.get(); outerInstance.log.Info(format("'%s' flushing speed: %s.", FileName, FlushSpeed(writtenBytes - LastReportedBytesWritten, opportunityIntervalNanos))); LastReportingTime = now; LastReportedBytesWritten = writtenBytes; } return(flushEvent); }