7fd59977 |
1 | // File: QANCollection_PerfLists.hxx |
2 | // Created: Tue Apr 30 11:24:20 2002 |
3 | // Author: Alexander KARTOMIN (akm) |
4 | // <a-kartomin@opencascade.com> |
5 | |
6 | |
7 | #ifndef QANCollection_PerfLists_HeaderFile |
8 | #define QANCollection_PerfLists_HeaderFile |
9 | |
10 | #include <QANCollection_ListOfPnt.hxx> |
11 | #include <QANCollection_SListOfPnt.hxx> |
12 | #include <QANCollection_QueueOfPnt.hxx> |
13 | #include <QANCollection_StackOfPnt.hxx> |
14 | #include <TColgp_SequenceOfPnt.hxx> |
15 | #include <TColStd_SetOfInteger.hxx> |
16 | |
17 | // ===================== Test perform of List type ========================== |
18 | void CompList (const Standard_Integer theRep, |
19 | const Standard_Integer theSize) |
20 | { |
21 | Standard_Integer i,j; |
22 | |
23 | ////////////////////////////////Perf_Meter aNAppe ("NCollection_List appending",0); |
24 | ////////////////////////////////Perf_Meter aTAppe ("TCollection_List appending",0); |
25 | ////////////////////////////////Perf_Meter aNOper ("NCollection_List operator=",0); |
26 | ////////////////////////////////Perf_Meter aTOper ("TCollection_List operator=",0); |
27 | ////////////////////////////////Perf_Meter aNClea ("NCollection_List clearing",0); |
28 | ////////////////////////////////Perf_Meter aTClea ("TCollection_List clearing",0); |
29 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_List Assign",0); |
30 | for (i=0; i<theRep; i++) |
31 | { |
32 | ////////////////////////////////QANCollection_List a1, a2; |
33 | QANCollection_ListPerf a1, a2; |
34 | ////////////////////////////////aNAppe.Start(); |
35 | PERF_START_METER("NCollection_List appending") |
36 | for (j=1; j<=theSize; j++) |
37 | { |
38 | ItemType anItem; |
39 | Random(anItem); |
40 | a1.Append(anItem); |
41 | } |
42 | ////////////////////////////////aNAppe.Stop(); |
43 | PERF_STOP_METER("NCollection_List appending") |
44 | ////////////////////////////////aNOper.Start(); |
45 | PERF_START_METER("NCollection_List operator=") |
46 | a2 = a1; |
47 | ////////////////////////////////aNOper.Stop(); |
48 | PERF_STOP_METER("NCollection_List operator=") |
49 | ////////////////////////////////aNAssi.Start(); |
50 | PERF_START_METER("NCollection_List Assign") |
51 | a2.Assign(a1); |
52 | ////////////////////////////////aNAssi.Stop(); |
53 | PERF_STOP_METER("NCollection_List Assign") |
54 | ////////////////////////////////aNClea.Start(); |
55 | PERF_START_METER("NCollection_List clearing") |
56 | a2.Clear(); |
57 | ////////////////////////////////aNClea.Stop(); |
58 | PERF_STOP_METER("NCollection_List clearing") |
59 | } |
60 | |
61 | for (i=0; i<theRep; i++) |
62 | { |
63 | QANCollection_ListOfPnt a1, a2; |
64 | ////////////////////////////////aTAppe.Start(); |
65 | PERF_START_METER("TCollection_List appending") |
66 | for (j=1; j<=theSize; j++) |
67 | { |
68 | ItemType anItem; |
69 | Random(anItem); |
70 | a1.Append(anItem); |
71 | } |
72 | ////////////////////////////////aTAppe.Stop(); |
73 | PERF_STOP_METER("TCollection_List appending") |
74 | ////////////////////////////////aTOper.Start(); |
75 | PERF_START_METER("TCollection_List operator=") |
76 | a2 = a1; |
77 | ////////////////////////////////aTOper.Stop(); |
78 | PERF_STOP_METER("TCollection_List operator=") |
79 | ////////////////////////////////aTClea.Start(); |
80 | PERF_START_METER("TCollection_List clearing") |
81 | a2.Clear(); |
82 | ////////////////////////////////aTClea.Stop(); |
83 | PERF_STOP_METER("TCollection_List clearing") |
84 | } |
85 | PERF_PRINT_ALL_METERS |
86 | } |
87 | |
88 | // ===================== Test perform of Queue type ========================== |
89 | void CompQueue (const Standard_Integer theRep, |
90 | const Standard_Integer theSize) |
91 | { |
92 | Standard_Integer i,j; |
93 | |
94 | ////////////////////////////////Perf_Meter aNPush ("NCollection_Queue pushing",0); |
95 | ////////////////////////////////Perf_Meter aTPush ("TCollection_Queue pushing",0); |
96 | ////////////////////////////////Perf_Meter aNPopp ("NCollection_Queue popping",0); |
97 | ////////////////////////////////Perf_Meter aTPopp ("TCollection_Queue popping",0); |
98 | ////////////////////////////////Perf_Meter aNOper ("NCollection_Queue operator=",0); |
99 | ////////////////////////////////Perf_Meter aTOper ("TCollection_Queue operator=",0); |
100 | ////////////////////////////////Perf_Meter aNClea ("NCollection_Queue clearing",0); |
101 | ////////////////////////////////Perf_Meter aTClea ("TCollection_Queue clearing",0); |
102 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_Queue Assign",0); |
103 | for (i=0; i<theRep; i++) |
104 | { |
105 | ////////////////////////////////QANCollection_Queue a1, a2; |
106 | QANCollection_QueuePerf a1, a2; |
107 | ////////////////////////////////aNPush.Start(); |
108 | PERF_START_METER("NCollection_Queue pushing") |
109 | for (j=1; j<=theSize; j++) |
110 | { |
111 | ItemType anItem; |
112 | Random(anItem); |
113 | a1.Push(anItem); |
114 | } |
115 | ////////////////////////////////aNPush.Stop(); |
116 | PERF_STOP_METER("NCollection_Queue pushing") |
117 | ////////////////////////////////aNOper.Start(); |
118 | PERF_START_METER("NCollection_Queue operator=") |
119 | a2 = a1; |
120 | ////////////////////////////////aNOper.Stop(); |
121 | PERF_STOP_METER("NCollection_Queue operator=") |
122 | ////////////////////////////////aNAssi.Start(); |
123 | PERF_START_METER("NCollection_Queue Assign") |
124 | a2.Assign(a1); |
125 | ////////////////////////////////aNAssi.Stop(); |
126 | PERF_STOP_METER("NCollection_Queue Assign") |
127 | ////////////////////////////////aNPopp.Start(); |
128 | PERF_START_METER("NCollection_Queue popping") |
129 | for (j=1; j<=theSize; j++) |
130 | a1.Pop(); |
131 | ////////////////////////////////aNPopp.Stop(); |
132 | PERF_STOP_METER("NCollection_Queue popping") |
133 | ////////////////////////////////aNClea.Start(); |
134 | PERF_START_METER("NCollection_Queue clearing") |
135 | a2.Clear(); |
136 | ////////////////////////////////aNClea.Stop(); |
137 | PERF_STOP_METER("NCollection_Queue clearing") |
138 | } |
139 | |
140 | for (i=0; i<theRep; i++) |
141 | { |
142 | QANCollection_QueueOfPnt a1, a2; |
143 | ////////////////////////////////aTPush.Start(); |
144 | PERF_START_METER("TCollection_Queue pushing") |
145 | for (j=1; j<=theSize; j++) |
146 | { |
147 | ItemType anItem; |
148 | Random(anItem); |
149 | a1.Push(anItem); |
150 | } |
151 | ////////////////////////////////aTPush.Stop(); |
152 | PERF_STOP_METER("TCollection_Queue pushing") |
153 | ////////////////////////////////aTOper.Start(); |
154 | PERF_START_METER("TCollection_Queue operator=") |
155 | a2 = a1; |
156 | ////////////////////////////////aTOper.Stop(); |
157 | PERF_STOP_METER("TCollection_Queue operator=") |
158 | ////////////////////////////////aTPopp.Start(); |
159 | PERF_START_METER("TCollection_Queue popping") |
160 | for (j=1; j<=theSize; j++) |
161 | a1.Pop(); |
162 | ////////////////////////////////aTPopp.Stop(); |
163 | PERF_STOP_METER("TCollection_Queue popping") |
164 | ////////////////////////////////aTClea.Start(); |
165 | PERF_START_METER("TCollection_Queue clearing") |
166 | a2.Clear(); |
167 | ////////////////////////////////aTClea.Stop(); |
168 | PERF_STOP_METER("TCollection_Queue clearing") |
169 | } |
170 | PERF_PRINT_ALL_METERS |
171 | } |
172 | |
173 | // ===================== Test perform of Stack type ========================== |
174 | void CompStack (const Standard_Integer theRep, |
175 | const Standard_Integer theSize) |
176 | { |
177 | Standard_Integer i,j; |
178 | |
179 | ////////////////////////////////Perf_Meter aNPush ("NCollection_Stack pushing",0); |
180 | ////////////////////////////////Perf_Meter aTPush ("TCollection_Stack pushing",0); |
181 | ////////////////////////////////Perf_Meter aNPopp ("NCollection_Stack popping",0); |
182 | ////////////////////////////////Perf_Meter aTPopp ("TCollection_Stack popping",0); |
183 | ////////////////////////////////Perf_Meter aNOper ("NCollection_Stack operator=",0); |
184 | ////////////////////////////////Perf_Meter aTOper ("TCollection_Stack operator=",0); |
185 | ////////////////////////////////Perf_Meter aNClea ("NCollection_Stack clearing",0); |
186 | ////////////////////////////////Perf_Meter aTClea ("TCollection_Stack clearing",0); |
187 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_Stack Assign",0); |
188 | for (i=0; i<theRep; i++) |
189 | { |
190 | ////////////////////////////////QANCollection_Stack a1, a2; |
191 | QANCollection_StackPerf a1, a2; |
192 | ////////////////////////////////aNPush.Start(); |
193 | PERF_START_METER("NCollection_Stack pushing") |
194 | for (j=1; j<=theSize; j++) |
195 | { |
196 | ItemType anItem; |
197 | Random(anItem); |
198 | a1.Push(anItem); |
199 | } |
200 | ////////////////////////////////aNPush.Stop(); |
201 | PERF_STOP_METER("NCollection_Stack pushing") |
202 | ////////////////////////////////aNOper.Start(); |
203 | PERF_START_METER("NCollection_Stack operator=") |
204 | a2 = a1; |
205 | ////////////////////////////////aNOper.Stop(); |
206 | PERF_STOP_METER("NCollection_Stack operator=") |
207 | ////////////////////////////////aNAssi.Start(); |
208 | PERF_START_METER("NCollection_Stack Assign") |
209 | a2.Assign(a1); |
210 | ////////////////////////////////aNAssi.Stop(); |
211 | PERF_STOP_METER("NCollection_Stack Assign") |
212 | ////////////////////////////////aNPopp.Start(); |
213 | PERF_START_METER("NCollection_Stack popping") |
214 | for (j=1; j<=theSize; j++) |
215 | a1.Pop(); |
216 | ////////////////////////////////aNPopp.Stop(); |
217 | PERF_STOP_METER("NCollection_Stack popping") |
218 | ////////////////////////////////aNClea.Start(); |
219 | PERF_START_METER("NCollection_Stack clearing") |
220 | a2.Clear(); |
221 | ////////////////////////////////aNClea.Stop(); |
222 | PERF_STOP_METER("NCollection_Stack clearing") |
223 | } |
224 | |
225 | for (i=0; i<theRep; i++) |
226 | { |
227 | QANCollection_StackOfPnt a1, a2; |
228 | ////////////////////////////////aTPush.Start(); |
229 | PERF_START_METER("TCollection_Stack pushing") |
230 | for (j=1; j<=theSize; j++) |
231 | { |
232 | ItemType anItem; |
233 | Random(anItem); |
234 | a1.Push(anItem); |
235 | } |
236 | ////////////////////////////////aTPush.Stop(); |
237 | PERF_STOP_METER("TCollection_Stack pushing") |
238 | ////////////////////////////////aTOper.Start(); |
239 | PERF_START_METER("TCollection_Stack operator=") |
240 | a2 = a1; |
241 | ////////////////////////////////aTOper.Stop(); |
242 | PERF_STOP_METER("TCollection_Stack operator=") |
243 | ////////////////////////////////aTPopp.Start(); |
244 | PERF_START_METER("TCollection_Stack popping") |
245 | for (j=1; j<=theSize; j++) |
246 | a1.Pop(); |
247 | ////////////////////////////////aTPopp.Stop(); |
248 | PERF_STOP_METER("TCollection_Stack popping") |
249 | ////////////////////////////////aTClea.Start(); |
250 | PERF_START_METER("TCollection_Stack clearing") |
251 | a2.Clear(); |
252 | ////////////////////////////////aTClea.Stop(); |
253 | PERF_STOP_METER("TCollection_Stack clearing") |
254 | } |
255 | PERF_PRINT_ALL_METERS |
256 | } |
257 | |
258 | |
259 | // ===================== Test perform of Set type ========================== |
260 | void CompSet (const Standard_Integer theRep, |
261 | const Standard_Integer theSize) |
262 | { |
263 | Standard_Integer i,j; |
264 | |
265 | ////////////////////////////////Perf_Meter aNPush ("NCollection_Set pushing",0); |
266 | ////////////////////////////////Perf_Meter aTPush ("TCollection_Set pushing",0); |
267 | ////////////////////////////////Perf_Meter aNFind ("NCollection_Set finding",0); |
268 | ////////////////////////////////Perf_Meter aTFind ("TCollection_Set finding",0); |
269 | ////////////////////////////////Perf_Meter aNOper ("NCollection_Set operator=",0); |
270 | ////////////////////////////////Perf_Meter aTOper ("TCollection_Set operator=",0); |
271 | ////////////////////////////////Perf_Meter aNClea ("NCollection_Set clearing",0); |
272 | ////////////////////////////////Perf_Meter aTClea ("TCollection_Set clearing",0); |
273 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_Set Assign",0); |
274 | for (i=0; i<theRep; i++) |
275 | { |
276 | ////////////////////////////////QANCollection_Set a1, a2; |
277 | QANCollection_SetPerf a1, a2; |
278 | ////////////////////////////////aNPush.Start(); |
279 | PERF_START_METER("NCollection_Set pushing") |
280 | for (j=1; j<=theSize; j++) |
281 | { |
282 | Key2Type anItem; |
283 | Random(anItem); |
284 | a1.Add(anItem); |
285 | } |
286 | ////////////////////////////////aNPush.Stop(); |
287 | PERF_STOP_METER("NCollection_Set pushing") |
288 | ////////////////////////////////aNFind.Start(); |
289 | PERF_START_METER("NCollection_Set finding") |
290 | for (j=1; j<=theSize; j++) |
291 | { |
292 | Key2Type anItem; |
293 | Random(anItem); |
294 | a1.Contains(anItem); |
295 | } |
296 | ////////////////////////////////aNFind.Stop(); |
297 | PERF_STOP_METER("NCollection_Set finding") |
298 | ////////////////////////////////aNOper.Start(); |
299 | PERF_START_METER("NCollection_Set operator=") |
300 | a2 = a1; |
301 | ////////////////////////////////aNOper.Stop(); |
302 | PERF_STOP_METER("NCollection_Set operator=") |
303 | ////////////////////////////////aNAssi.Start(); |
304 | PERF_START_METER("NCollection_Set Assign") |
305 | a2.Assign(a1); |
306 | ////////////////////////////////aNAssi.Stop(); |
307 | PERF_STOP_METER("NCollection_Set Assign") |
308 | ////////////////////////////////aNClea.Start(); |
309 | PERF_START_METER("NCollection_Set clearing") |
310 | a2.Clear(); |
311 | ////////////////////////////////aNClea.Stop(); |
312 | PERF_STOP_METER("NCollection_Set clearing") |
313 | } |
314 | |
315 | for (i=0; i<theRep; i++) |
316 | { |
317 | TColStd_SetOfInteger a1, a2; |
318 | ////////////////////////////////aTPush.Start(); |
319 | PERF_START_METER("TCollection_Set pushing") |
320 | for (j=1; j<=theSize; j++) |
321 | { |
322 | Key2Type anItem; |
323 | Random(anItem); |
324 | a1.Add(anItem); |
325 | } |
326 | ////////////////////////////////aTPush.Stop(); |
327 | PERF_STOP_METER("TCollection_Set pushing") |
328 | ////////////////////////////////aTFind.Start(); |
329 | PERF_START_METER("TCollection_Set finding") |
330 | for (j=1; j<=theSize; j++) |
331 | { |
332 | Key2Type anItem; |
333 | Random(anItem); |
334 | a1.Contains(anItem); |
335 | } |
336 | ////////////////////////////////aTFind.Stop(); |
337 | PERF_STOP_METER("TCollection_Set finding") |
338 | ////////////////////////////////aTOper.Start(); |
339 | PERF_START_METER("TCollection_Set operator=") |
340 | a2 = a1; |
341 | ////////////////////////////////aTOper.Stop(); |
342 | PERF_STOP_METER("TCollection_Set operator=") |
343 | ////////////////////////////////aTClea.Start(); |
344 | PERF_START_METER("TCollection_Set clearing") |
345 | a2.Clear(); |
346 | ////////////////////////////////aTClea.Stop(); |
347 | PERF_STOP_METER("TCollection_Set clearing") |
348 | } |
349 | PERF_PRINT_ALL_METERS |
350 | } |
351 | |
352 | |
353 | // ===================== Test perform of SList type ========================== |
354 | void CompSList (const Standard_Integer theRep, |
355 | const Standard_Integer theSize) |
356 | { |
357 | Standard_Integer i,j; |
358 | |
359 | ////////////////////////////////Perf_Meter aNAppe ("NCollection_SList constructing",0); |
360 | ////////////////////////////////Perf_Meter aTAppe ("TCollection_SList constructing",0); |
361 | ////////////////////////////////Perf_Meter aNOper ("NCollection_SList operator=",0); |
362 | ////////////////////////////////Perf_Meter aTOper ("TCollection_SList operator=",0); |
363 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_SList Assign",0); |
364 | ////////////////////////////////Perf_Meter aNClea ("NCollection_SList clearing",0); |
365 | ////////////////////////////////Perf_Meter aTClea ("TCollection_SList clearing",0); |
366 | for (i=0; i<theRep; i++) |
367 | { |
368 | ////////////////////////////////QANCollection_SList a1, a2; |
369 | QANCollection_SListPerf a1, a2; |
370 | ////////////////////////////////aNAppe.Start(); |
371 | PERF_START_METER("NCollection_SList constructing") |
372 | for (j=1; j<=theSize; j++) |
373 | { |
374 | ItemType anItem; |
375 | Random(anItem); |
376 | a1.Construct(anItem); |
377 | } |
378 | ////////////////////////////////aNAppe.Stop(); |
379 | PERF_STOP_METER("NCollection_SList constructing") |
380 | ////////////////////////////////aNOper.Start(); |
381 | PERF_START_METER("NCollection_SList operator=") |
382 | a2 = a1; |
383 | ////////////////////////////////aNOper.Stop(); |
384 | PERF_STOP_METER("NCollection_SList operator=") |
385 | ////////////////////////////////aNAssi.Start(); |
386 | PERF_START_METER("NCollection_SList Assign") |
387 | a2.Assign(a1); |
388 | ////////////////////////////////aNAssi.Stop(); |
389 | PERF_STOP_METER("NCollection_SList Assign") |
390 | ////////////////////////////////aNClea.Start(); |
391 | PERF_START_METER("NCollection_SList clearing") |
392 | a2.Clear(); |
393 | ////////////////////////////////aNClea.Stop(); |
394 | PERF_STOP_METER("NCollection_SList clearing") |
395 | } |
396 | |
397 | for (i=0; i<theRep; i++) |
398 | { |
399 | QANCollection_SListOfPnt a1, a2; |
400 | ////////////////////////////////aTAppe.Start(); |
401 | PERF_START_METER("TCollection_SList constructing") |
402 | for (j=1; j<=theSize; j++) |
403 | { |
404 | ItemType anItem; |
405 | Random(anItem); |
406 | a1.Construct(anItem); |
407 | } |
408 | ////////////////////////////////aTAppe.Stop(); |
409 | PERF_STOP_METER("TCollection_SList constructing") |
410 | ////////////////////////////////aTOper.Start(); |
411 | PERF_START_METER("TCollection_SList operator=") |
412 | a2 = a1; |
413 | ////////////////////////////////aTOper.Stop(); |
414 | PERF_STOP_METER("TCollection_SList operator=") |
415 | ////////////////////////////////aTClea.Start(); |
416 | PERF_START_METER("TCollection_SList clearing") |
417 | a2.Clear(); |
418 | ////////////////////////////////aTClea.Stop(); |
419 | PERF_STOP_METER("TCollection_SList clearing") |
420 | } |
421 | PERF_PRINT_ALL_METERS |
422 | } |
423 | |
424 | // ===================== Test perform of Sequence type ========================== |
425 | void CompSequence (const Standard_Integer theRep, |
426 | const Standard_Integer theSize) |
427 | { |
428 | Standard_Integer i,j; |
429 | |
430 | ////////////////////////////////Perf_Meter aNAppe ("NCollection_Sequence appending",0); |
431 | ////////////////////////////////Perf_Meter aTAppe ("TCollection_Sequence appending",0); |
432 | ////////////////////////////////Perf_Meter aNFind ("NCollection_Sequence finding",0); |
433 | ////////////////////////////////Perf_Meter aTFind ("TCollection_Sequence finding",0); |
434 | ////////////////////////////////Perf_Meter aNOper ("NCollection_Sequence operator=",0); |
435 | ////////////////////////////////Perf_Meter aTOper ("TCollection_Sequence operator=",0); |
436 | ////////////////////////////////Perf_Meter aNClea ("NCollection_Sequence clearing",0); |
437 | ////////////////////////////////Perf_Meter aTClea ("TCollection_Sequence clearing",0); |
438 | ////////////////////////////////Perf_Meter aNAssi ("NCollection_Sequence Assign",0); |
439 | for (i=0; i<theRep; i++) |
440 | { |
441 | ////////////////////////////////QANCollection_Sequence a1, a2; |
442 | QANCollection_SequencePerf a1, a2; |
443 | ////////////////////////////////aNAppe.Start(); |
444 | PERF_START_METER("NCollection_Sequence appending") |
445 | for (j=1; j<=theSize; j++) |
446 | { |
447 | ItemType anItem; |
448 | Random(anItem); |
449 | a1.Append(anItem); |
450 | } |
451 | ////////////////////////////////aNAppe.Stop(); |
452 | PERF_STOP_METER("NCollection_Sequence appending") |
453 | ////////////////////////////////aNFind.Start(); |
454 | PERF_START_METER("NCollection_Sequence finding") |
455 | for (j=1; j<=theSize; j++) |
456 | { |
457 | Standard_Integer iIndex; |
458 | Random(iIndex,theSize); |
459 | a1.Value(iIndex+1); |
460 | } |
461 | ////////////////////////////////aNFind.Stop(); |
462 | PERF_STOP_METER("NCollection_Sequence finding") |
463 | ////////////////////////////////aNOper.Start(); |
464 | PERF_START_METER("NCollection_Sequence operator=") |
465 | a2 = a1; |
466 | ////////////////////////////////aNOper.Stop(); |
467 | PERF_STOP_METER("NCollection_Sequence operator=") |
468 | ////////////////////////////////aNAssi.Start(); |
469 | PERF_START_METER("NCollection_Sequence Assign") |
470 | a2.Assign(a1); |
471 | ////////////////////////////////aNAssi.Stop(); |
472 | PERF_STOP_METER("NCollection_Sequence Assign") |
473 | ////////////////////////////////aNClea.Start(); |
474 | PERF_START_METER("NCollection_Sequence clearing") |
475 | a2.Clear(); |
476 | ////////////////////////////////aNClea.Stop(); |
477 | PERF_STOP_METER("NCollection_Sequence clearing") |
478 | } |
479 | |
480 | for (i=0; i<theRep; i++) |
481 | { |
482 | TColgp_SequenceOfPnt a1, a2; |
483 | ////////////////////////////////aTAppe.Start(); |
484 | PERF_START_METER("TCollection_Sequence appending") |
485 | for (j=1; j<=theSize; j++) |
486 | { |
487 | ItemType anItem; |
488 | Random(anItem); |
489 | a1.Append(anItem); |
490 | } |
491 | ////////////////////////////////aTAppe.Stop(); |
492 | PERF_STOP_METER("TCollection_Sequence appending") |
493 | ////////////////////////////////aTFind.Start(); |
494 | PERF_START_METER("TCollection_Sequence finding") |
495 | for (j=1; j<=theSize; j++) |
496 | { |
497 | Standard_Integer iIndex; |
498 | Random(iIndex,theSize); |
499 | a1.Value(iIndex+1); |
500 | } |
501 | ////////////////////////////////aTFind.Stop(); |
502 | PERF_STOP_METER("TCollection_Sequence finding") |
503 | ////////////////////////////////aTOper.Start(); |
504 | PERF_START_METER("TCollection_Sequence operator=") |
505 | a2 = a1; |
506 | ////////////////////////////////aTOper.Stop(); |
507 | PERF_STOP_METER("TCollection_Sequence operator=") |
508 | ////////////////////////////////aTClea.Start(); |
509 | PERF_START_METER("TCollection_Sequence clearing") |
510 | a2.Clear(); |
511 | ////////////////////////////////aTClea.Stop(); |
512 | PERF_STOP_METER("TCollection_Sequence clearing") |
513 | } |
514 | PERF_PRINT_ALL_METERS |
515 | } |
516 | |
517 | #endif |