sobinist

Untitled

Jun 22nd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.92 KB | None | 0 0
  1. // BEGIN USER CODE
  2.         long start = System.currentTimeMillis();
  3.         ArrayList<IMendixObject> testList = new ArrayList<>();
  4.         for(int i=0;i<this.AmountOfObjects;i++) {
  5.             IMendixObject test = Core.instantiate(getContext(), TestObject.entityName);
  6.             test.setValue(getContext(), TestObject.MemberNames.Value.name(), i);
  7.             testList.add(test);
  8.         }
  9.  
  10.         long afterCreation = System.currentTimeMillis();
  11.        
  12.         Core.commit(getContext(), testList);
  13.  
  14.         long afterCommit = System.currentTimeMillis();
  15.        
  16.         String creationTime = Float.toString((float)(afterCreation - start) / 1000);
  17.         String commitTime = Float.toString((float)(afterCommit - afterCreation) / 1000);
  18.         String totalTime = Float.toString((float)(afterCommit - start) / 1000);
  19.         FeedbackHelper.addTextMessageFeedback(getContext(), MessageType.INFO, "Creation time: "+creationTime+"\nCommit time: "+commitTime+"\nTotal time: "+totalTime, false);
  20.         return true;
  21.         // END USER CODE
Add Comment
Please, Sign In to add comment