Toggle navigation
Home
com.orientechnologies.orient.stresstest.workload.OBaseDocumentWorkload.OWorkLoadContext to com.orientechnologies.orient.stresstest.workload.OBaseWorkload.OBaseWorkLoadContext
No. of Instances - 5
No. of Commits - 1
No. of Projects - {'orientdb'}
Hierarchy/Composition: R_SUPER_T
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Cascading Type Change (Different)
int
to
OBaseWorkLoadContext
Add or Remove Method invocation
getDocumentDatabase(dbIdentifier)
to
currentThread
context.db.close()
to
context.close()
threadTotal
to
context.close()
Update Anonymous class
{ @Override public void run(){ final int threadTotal=context.threadId < concurrencyLevel - 1 ? totalPerThread : totalPerLastThread; context.db=getDocumentDatabase(dbIdentifier); try { final int startIdx=totalPerThread * context.threadId; for (int i=0; i < threadTotal; ++i) { context.currentIdx=startIdx + i; final long startOp=System.nanoTime(); try { callback.call(context); } catch ( Exception e) { errors.add(e.toString()); if (errors.size() > MAX_ERRORS) { e.printStackTrace(); break; } } finally { operationTiming.set(context.currentIdx,System.nanoTime() - startOp); } } } finally { context.db.close(); } } }
to
{ @Override public void run(){ final OBaseWorkLoadContext context=getContext(); context.threadId=currentThread; context.totalPerThread=context.threadId < concurrencyLevel - 1 ? totalPerThread : totalPerLastThread; context.init(dbIdentifier); try { final int startIdx=totalPerThread * context.threadId; for (int i=0; i < context.totalPerThread; ++i) { context.currentIdx=startIdx + i; final long startOp=System.nanoTime(); try { callback.call(context); } catch ( Exception e) { errors.add(e.toString()); if (errors.size() > MAX_ERRORS) { e.printStackTrace(); break; } } finally { operationTiming.set(context.currentIdx,System.nanoTime() - startOp); } } } finally { context.close(); } } }