Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // BEGIN USER CODE
- long start = System.currentTimeMillis();
- ArrayList<IMendixObject> testList = new ArrayList<>();
- for(int i=0;i<this.AmountOfObjects;i++) {
- IMendixObject test = Core.instantiate(getContext(), TestObject.entityName);
- test.setValue(getContext(), TestObject.MemberNames.Value.name(), i);
- testList.add(test);
- }
- long afterCreation = System.currentTimeMillis();
- Core.commit(getContext(), testList);
- long afterCommit = System.currentTimeMillis();
- String creationTime = Float.toString((float)(afterCreation - start) / 1000);
- String commitTime = Float.toString((float)(afterCommit - afterCreation) / 1000);
- String totalTime = Float.toString((float)(afterCommit - start) / 1000);
- FeedbackHelper.addTextMessageFeedback(getContext(), MessageType.INFO, "Creation time: "+creationTime+"\nCommit time: "+commitTime+"\nTotal time: "+totalTime, false);
- return true;
- // END USER CODE
Add Comment
Please, Sign In to add comment