Toggle navigation
Home
long to org.apache.ignite.internal.managers.communication.GridIoManager.IoTestThreadLocalNodeResults
No. of Instances - 3
No. of Commits - 1
No. of Projects - {'ignite'}
Hierarchy/Composition: Composition
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
Add or Remove Method invocation
node.id()
to
nodeId
node.id()
to
nodeId
log.info("IO test started " + "[warmup=" + warmup + ", duration="+ duration+ ", threads="+ threads+ ", maxLatency="+ maxLatency+ ", rangesCnt="+ rangesCnt+ ", payLoadSize="+ payLoadSize+ ", procFromNioThreads="+ procFromNioThread+ ']')
to
log.info("IO test started " + "[warmup=" + warmup + ", duration="+ duration+ ", threads="+ threads+ ", latencyLimit="+ latencyLimit+ ", rangesCnt="+ rangesCnt+ ", payLoadSize="+ payLoadSize+ ", procFromNioThreads="+ procFromNioThread+ ']')
res0.put(e.getKey(),e.getValue())
to
printIoTestResults(res)
printIoTestResults(maxLatency / (1000 * rangesCnt),res0,maxLatencies)
to
printIoTestResults(res)
node.id()
to
nodeId
node.id()
to
nodeId
Update Class Instacne Creation
new long[rangesCnt + 1]
to
new IoTestThreadLocalNodeResults(rangesCnt,latencyLimit)
new long[rangesCnt + 1]
to
new IoTestThreadLocalNodeResults(rangesCnt,latencyLimit)
Rename Variable
latencies
to
nodeRes
latencies
to
nodeRes
latencies
to
nodeRes
Cascading Type Change (Similar)
long[]
to
IoTestThreadLocalNodeResults
Map<UUID,long[]>
to
Map<UUID,IoTestThreadLocalNodeResults>
long[]
to
IoTestThreadLocalNodeResults
Update Anonymous class
{ @Override public void run(){ boolean failed=true; try { bar.await(); long start=System.currentTimeMillis(); if (log.isInfoEnabled()) log.info("IO test started " + "[warmup=" + warmup + ", duration="+ duration+ ", threads="+ threads+ ", maxLatency="+ maxLatency+ ", rangesCnt="+ rangesCnt+ ", payLoadSize="+ payLoadSize+ ", procFromNioThreads="+ procFromNioThread+ ']'); for (; ; ) { if (!warmupFinished.get() && System.currentTimeMillis() - start > warmup) { if (log.isInfoEnabled()) log.info("IO test warmup finished."); warmupFinished.set(true); start=System.currentTimeMillis(); } if (warmupFinished.get() && System.currentTimeMillis() - start > duration) { if (log.isInfoEnabled()) log.info("IO test finished, will wait for all threads to finish."); done.set(true); bar.await(); failed=false; break; } if (log.isInfoEnabled()) log.info("IO test [opsCnt/sec=" + (cnt.sumThenReset() * 1000 / sleepDuration) + ", warmup="+ !warmupFinished.get()+ ", elapsed="+ (System.currentTimeMillis() - start)+ ']'); Thread.sleep(sleepDuration); } Map<UUID,long[]> res0=new HashMap<>(); for ( Map<UUID,long[]> r : res) { for ( Entry<UUID,long[]> e : r.entrySet()) { long[] r0=res0.get(e.getKey()); if (r0 == null) res0.put(e.getKey(),e.getValue()); else { for (int i=0; i < rangesCnt + 1; i++) r0[i]+=e.getValue()[i]; } } } printIoTestResults(maxLatency / (1000 * rangesCnt),res0,maxLatencies); } catch ( InterruptedException|BrokenBarrierException e) { U.error(log,"IO test failed.",e); } finally { if (failed) bar.reset(); } } }
to
{ @Override public void run(){ boolean failed=true; try { bar.await(); long start=System.currentTimeMillis(); if (log.isInfoEnabled()) log.info("IO test started " + "[warmup=" + warmup + ", duration="+ duration+ ", threads="+ threads+ ", latencyLimit="+ latencyLimit+ ", rangesCnt="+ rangesCnt+ ", payLoadSize="+ payLoadSize+ ", procFromNioThreads="+ procFromNioThread+ ']'); for (; ; ) { if (!warmupFinished.get() && System.currentTimeMillis() - start > warmup) { if (log.isInfoEnabled()) log.info("IO test warmup finished."); warmupFinished.set(true); start=System.currentTimeMillis(); } if (warmupFinished.get() && System.currentTimeMillis() - start > duration) { if (log.isInfoEnabled()) log.info("IO test finished, will wait for all threads to finish."); done.set(true); bar.await(); failed=false; break; } if (log.isInfoEnabled()) log.info("IO test [opsCnt/sec=" + (cnt.sumThenReset() * 1000 / sleepDuration) + ", warmup="+ !warmupFinished.get()+ ", elapsed="+ (System.currentTimeMillis() - start)+ ']'); Thread.sleep(sleepDuration); } printIoTestResults(res); } catch ( InterruptedException|BrokenBarrierException e) { U.error(log,"IO test failed.",e); } finally { if (failed) bar.reset(); } } }