Skip to content

Commit

Permalink
Post merge updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaDemianenko committed Nov 15, 2017
1 parent 008a1e0 commit f777551
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Expand Up @@ -641,7 +641,7 @@ public void assertNoLogCallContaining( String partOfMessage )


public void assertLogStringContains( String partOfMessage ) public void assertLogStringContains( String partOfMessage )
{ {
synchronized (logCalls) synchronized ( logCalls )
{ {
for ( LogCall logCall : logCalls ) for ( LogCall logCall : logCalls )
{ {
Expand Down
Expand Up @@ -234,7 +234,7 @@ private class VerboseFlushOpportunity implements FlushEventOpportunity
} }


@Override @Override
public FlushEvent beginFlush( long filePageId, int cachePageId, PageSwapper swapper ) public FlushEvent beginFlush( long filePageId, long cachePageId, PageSwapper swapper )
{ {
long now = clock.nanos(); long now = clock.nanos();
long opportunityIntervalNanos = now - lastReportingTime; long opportunityIntervalNanos = now - lastReportingTime;
Expand Down
Expand Up @@ -21,9 +21,9 @@


import org.neo4j.helpers.Service; import org.neo4j.helpers.Service;
import org.neo4j.io.pagecache.tracing.PageCacheTracer; import org.neo4j.io.pagecache.tracing.PageCacheTracer;
import org.neo4j.kernel.impl.util.JobScheduler;
import org.neo4j.kernel.monitoring.Monitors; import org.neo4j.kernel.monitoring.Monitors;
import org.neo4j.logging.Log; import org.neo4j.logging.Log;
import org.neo4j.scheduler.JobScheduler;
import org.neo4j.time.SystemNanoClock; import org.neo4j.time.SystemNanoClock;


@Service.Implementation( TracerFactory.class ) @Service.Implementation( TracerFactory.class )
Expand Down
Expand Up @@ -65,7 +65,7 @@ public void traceSinglePageCacheFlush()
try ( MajorFlushEvent majorFlushEvent = tracer.beginCacheFlush() ) try ( MajorFlushEvent majorFlushEvent = tracer.beginCacheFlush() )
{ {
FlushEventOpportunity flushEventOpportunity = majorFlushEvent.flushEventOpportunity(); FlushEventOpportunity flushEventOpportunity = majorFlushEvent.flushEventOpportunity();
FlushEvent flushEvent = flushEventOpportunity.beginFlush( 1, 2, new DummyPageSwapper( "testFile" ) ); FlushEvent flushEvent = flushEventOpportunity.beginFlush( 1, 2, new DummyPageSwapper( "testFile", 1 ) );
flushEvent.addBytesWritten( 2 ); flushEvent.addBytesWritten( 2 );
flushEvent.addPagesFlushed( 7 ); flushEvent.addPagesFlushed( 7 );
flushEvent.done(); flushEvent.done();
Expand All @@ -82,15 +82,16 @@ public void evictionDoesNotInfluenceFlushNumbers()
try ( MajorFlushEvent majorFlushEvent = tracer.beginCacheFlush() ) try ( MajorFlushEvent majorFlushEvent = tracer.beginCacheFlush() )
{ {
FlushEventOpportunity flushEventOpportunity = majorFlushEvent.flushEventOpportunity(); FlushEventOpportunity flushEventOpportunity = majorFlushEvent.flushEventOpportunity();
FlushEvent flushEvent = flushEventOpportunity.beginFlush( 1, 2, new DummyPageSwapper( "testFile" ) ); FlushEvent flushEvent = flushEventOpportunity.beginFlush( 1, 2, new DummyPageSwapper( "testFile", 1 ) );
clock.forward( 2, TimeUnit.MILLISECONDS ); clock.forward( 2, TimeUnit.MILLISECONDS );


try ( EvictionRunEvent evictionRunEvent = tracer.beginPageEvictions( 5 ) ) try ( EvictionRunEvent evictionRunEvent = tracer.beginPageEvictions( 5 ) )
{ {
try ( EvictionEvent evictionEvent = evictionRunEvent.beginEviction() ) try ( EvictionEvent evictionEvent = evictionRunEvent.beginEviction() )
{ {
FlushEventOpportunity evictionEventOpportunity = evictionEvent.flushEventOpportunity(); FlushEventOpportunity evictionEventOpportunity = evictionEvent.flushEventOpportunity();
FlushEvent evictionFlush = evictionEventOpportunity.beginFlush( 2, 3, new DummyPageSwapper( "evictionFile" ) ); FlushEvent evictionFlush = evictionEventOpportunity.beginFlush( 2, 3,
new DummyPageSwapper( "evictionFile", 1 ) );
evictionFlush.addPagesFlushed( 10 ); evictionFlush.addPagesFlushed( 10 );
evictionFlush.addPagesFlushed( 100 ); evictionFlush.addPagesFlushed( 100 );
} }
Expand All @@ -108,7 +109,7 @@ public void evictionDoesNotInfluenceFlushNumbers()
public void traceFileFlush() public void traceFileFlush()
{ {
VerbosePageCacheTracer tracer = createTracer(); VerbosePageCacheTracer tracer = createTracer();
DummyPageSwapper swapper = new DummyPageSwapper( "fileToFlush" ); DummyPageSwapper swapper = new DummyPageSwapper( "fileToFlush", 1 );
try ( MajorFlushEvent fileToFlush = tracer.beginFileFlush( swapper ) ) try ( MajorFlushEvent fileToFlush = tracer.beginFileFlush( swapper ) )
{ {
FlushEventOpportunity flushEventOpportunity = fileToFlush.flushEventOpportunity(); FlushEventOpportunity flushEventOpportunity = fileToFlush.flushEventOpportunity();
Expand Down

0 comments on commit f777551

Please sign in to comment.