Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- system.debug('init ' + limits.getCpuTime());
- account[] testAcc = new account[]{};
- for (integer i=0; i<1000; i++){
- testAcc.add (new account (name = 'bunny'+i, recordtypeid= '01228000000YSb5AAG'));
- }
- insert testAcc;
- system.debug('fin ' + limits.getCpuTime());
- trigger acc on Account (after insert) {
- system.debug('init ' + limits.getCpuTime());
- if(trigger.isInsert && trigger.isAfter){
- integer startTime = limits.getCpuTime();
- account[] accList = new account[]{};
- for (account a: trigger.new) {
- if (a.name.startsWith('bunny')){
- accList.add ( new account (id = a.id, name = '1' + a.name));
- }
- }
- update accList;
- integer endTime = limits.getCpuTime();
- system.debug('time spent ' + (endTime - startTime));
- }
- system.debug('fin ' + limits.getCpuTime());
- }
- 19:29:29.236 (1236253657)|USER_DEBUG|[2]|DEBUG|init 218
- 19:29:30.433 (2433681531)|USER_DEBUG|[14]|DEBUG|time spent 182
- 19:29:30.433 (2433779634)|USER_DEBUG|[16]|DEBUG|fin 400
- 19:29:31.383 (3383811210)|USER_DEBUG|[2]|DEBUG|init 547
- 19:29:32.318 (4318653559)|USER_DEBUG|[14]|DEBUG|time spent 186
- 19:29:32.318 (4318728992)|USER_DEBUG|[16]|DEBUG|fin 733
- 19:29:33.384 (5384519465)|USER_DEBUG|[2]|DEBUG|init 879
- 19:29:34.463 (6463341239)|USER_DEBUG|[14]|DEBUG|time spent 194
- 19:29:34.463 (6463415658)|USER_DEBUG|[16]|DEBUG|fin 1073
- 19:29:35.519 (7519942400)|USER_DEBUG|[2]|DEBUG|init 1221
- 19:29:36.496 (8496883237)|USER_DEBUG|[14]|DEBUG|time spent 176
- 19:29:36.496 (8496963064)|USER_DEBUG|[16]|DEBUG|fin 1397
- 19:29:37.359 (9359159436)|USER_DEBUG|[2]|DEBUG|init 1539
- 19:29:38.342 (10342250700)|USER_DEBUG|[14]|DEBUG|time spent 175
- 19:29:38.342 (10342325892)|USER_DEBUG|[16]|DEBUG|fin 1714
- 19:29:38.418 (10418464850)|USER_DEBUG|[10]|DEBUG|fin 1758
- 19:36:08.049 (1049372513)|USER_DEBUG|[2]|DEBUG|init 272
- 19:36:08.983 (1983787717)|USER_DEBUG|[14]|DEBUG|time spent 220
- 19:36:08.983 (1983884750)|USER_DEBUG|[16]|DEBUG|fin 493
- 19:36:09.894 (2894742216)|USER_DEBUG|[2]|DEBUG|init 675
- 19:36:10.938 (3938129600)|USER_DEBUG|[14]|DEBUG|time spent 221
- 19:36:10.938 (3938195554)|USER_DEBUG|[16]|DEBUG|fin 896
- 19:36:11.806 (4806611755)|USER_DEBUG|[2]|DEBUG|init 1076
- 19:36:12.848 (5848225244)|USER_DEBUG|[14]|DEBUG|time spent 219
- 19:36:12.848 (5848291219)|USER_DEBUG|[16]|DEBUG|fin 1295
- 19:36:13.718 (6718297370)|USER_DEBUG|[2]|DEBUG|init 1480
- 19:36:14.755 (7755367410)|USER_DEBUG|[14]|DEBUG|time spent 221
- 19:36:14.755 (7755433819)|USER_DEBUG|[16]|DEBUG|fin 1701
- 19:36:15.737 (8737164443)|USER_DEBUG|[2]|DEBUG|init 1883
- 19:36:16.791 (9791173333)|USER_DEBUG|[14]|DEBUG|time spent 217
- 19:36:16.791 (9791239558)|USER_DEBUG|[16]|DEBUG|fin 2100
- 19:36:16.882 (9882798832)|USER_DEBUG|[10]|DEBUG|fin 2159
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement