001/*
002 * Copyright 2008-2024 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright 2008-2024 Ping Identity Corporation
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing, software
015 * distributed under the License is distributed on an "AS IS" BASIS,
016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017 * See the License for the specific language governing permissions and
018 * limitations under the License.
019 */
020/*
021 * Copyright (C) 2008-2024 Ping Identity Corporation
022 *
023 * This program is free software; you can redistribute it and/or modify
024 * it under the terms of the GNU General Public License (GPLv2 only)
025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
026 * as published by the Free Software Foundation.
027 *
028 * This program is distributed in the hope that it will be useful,
029 * but WITHOUT ANY WARRANTY; without even the implied warranty of
030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
031 * GNU General Public License for more details.
032 *
033 * You should have received a copy of the GNU General Public License
034 * along with this program; if not, see <http://www.gnu.org/licenses>.
035 */
036package com.unboundid.ldap.sdk.unboundidds.monitors;
037
038
039
040import java.util.Collections;
041import java.util.Iterator;
042import java.util.LinkedHashMap;
043import java.util.Map;
044
045import com.unboundid.ldap.sdk.Entry;
046import com.unboundid.util.Debug;
047import com.unboundid.util.NotExtensible;
048import com.unboundid.util.NotMutable;
049import com.unboundid.util.NotNull;
050import com.unboundid.util.Nullable;
051import com.unboundid.util.StaticUtils;
052import com.unboundid.util.ThreadSafety;
053import com.unboundid.util.ThreadSafetyLevel;
054
055import static com.unboundid.ldap.sdk.unboundidds.monitors.MonitorMessages.*;
056
057
058
059/**
060 * This class defines a monitor entry that provides information about the
061 * processing times of operations that are performed in the server.  It includes
062 * the total counts of each type of operation, the average response time for
063 * each type of operation, and counts and percentages of operations whose
064 * server-side processing time fits in defined buckets.
065 * <BR>
066 * <BLOCKQUOTE>
067 *   <B>NOTE:</B>  This class, and other classes within the
068 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
069 *   supported for use against Ping Identity, UnboundID, and
070 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
071 *   for proprietary functionality or for external specifications that are not
072 *   considered stable or mature enough to be guaranteed to work in an
073 *   interoperable way with other types of LDAP servers.
074 * </BLOCKQUOTE>
075 * <BR>
076 * The following buckets are defined in the default configuration:
077 * <UL>
078 *   <LI>Less than 1ms.</LI>
079 *   <LI>Greater than or equal to 1ms and less than 2ms.</LI>
080 *   <LI>Greater than or equal to 2ms and less than 3ms.</LI>
081 *   <LI>Greater than or equal to 3ms and less than 5ms.</LI>
082 *   <LI>Greater than or equal to 5ms and less than 10ms.</LI>
083 *   <LI>Greater than or equal to 10ms and less than 20ms.</LI>
084 *   <LI>Greater than or equal to 20ms and less than 30ms.</LI>
085 *   <LI>Greater than or equal to 30ms and less than 50ms.</LI>
086 *   <LI>Greater than or equal to 50ms and less than 100ms.</LI>
087 *   <LI>Greater than or equal to 100ms and less than 1000ms.</LI>
088 *   <LI>Greater than or equal to 1000ms.</LI>
089 * </UL>
090 * It provides the following information for each operation, as well as for the
091 * total for all operations:
092 * <UL>
093 *   <LI>The number of operations of the specified type within each bucket.</LI>
094 *   <LI>The percentage of operations of the specified type within each
095 *       bucket.</LI>
096 *   <LI>The aggregate percentage of operations of the specified type for each
097 *        bucket (i.e., the percentage of operations in that bucket or any
098 *        bucket for a lower duration).</LI>
099 * </UL>
100 * The server should present at most one processing time histogram monitor
101 * entry.  It can be retrieved using the
102 * {@link MonitorManager#getProcessingTimeHistogramMonitorEntry} method.
103 * This entry provides specific methods for accessing information about
104 * processing times per bucket (e.g., the
105 * {@link ProcessingTimeHistogramMonitorEntry#getAllOpsPercent} method can be
106 * used to retrieve a map containing the percent of operations within each
107 * bucket).  Alternately, this information may be accessed using the generic
108 * API.  See the {@link MonitorManager} class documentation for an example that
109 * demonstrates the use of the generic API for accessing monitor data.
110 */
111@NotMutable()
112@NotExtensible()
113@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
114public class ProcessingTimeHistogramMonitorEntry
115       extends MonitorEntry
116{
117  /**
118   * The structural object class used in processing time histogram monitor
119   * entries.
120   */
121  @NotNull static final String PROCESSING_TIME_HISTOGRAM_MONITOR_OC =
122       "ds-processing-time-histogram-monitor-entry";
123
124
125
126  /**
127   * The name of the attribute that contains the total number of add
128   * operations performed in the server.
129   */
130  @NotNull private static final String ATTR_ADD_TOTAL_COUNT =
131       "addOpsTotalCount";
132
133
134
135  /**
136   * The name of the attribute that contains the average response time in
137   * milliseconds for add operations performed in the server.
138   */
139  @NotNull private static final String ATTR_ADD_AVERAGE_RESPONSE_TIME_MS =
140       "addOpsAverageResponseTimeMillis";
141
142
143
144  /**
145   * The name of the attribute that contains the aggregate percentage of add
146   * operations within each processing time bucket.
147   */
148  @NotNull private static final String ATTR_ADD_AGGREGATE_PERCENT =
149       "addOpsAggregatePercent";
150
151
152
153  /**
154   * The name of the attribute that contains the total number of add operations
155   * within each processing time bucket.
156   */
157  @NotNull private static final String ATTR_ADD_COUNT = "addOpsCount";
158
159
160
161  /**
162   * The name of the attribute that contains the percentage of add operations
163   * within each processing time bucket.
164   */
165  @NotNull private static final String ATTR_ADD_PERCENT = "addOpsPercent";
166
167
168
169  /**
170   * The name of the attribute that contains the total number of all
171   * operations performed in the server.
172   */
173  @NotNull private static final String ATTR_ALL_TOTAL_COUNT =
174       "allOpsTotalCount";
175
176
177
178  /**
179   * The name of the attribute that contains the average response time in
180   * milliseconds for all operations performed in the server.
181   */
182  @NotNull private static final String ATTR_ALL_AVERAGE_RESPONSE_TIME_MS =
183       "allOpsAverageResponseTimeMillis";
184
185
186
187  /**
188   * The name of the attribute that contains the aggregate percentage of
189   * operations of all types within each processing time bucket.
190   */
191  @NotNull private static final String ATTR_ALL_AGGREGATE_PERCENT =
192       "allOpsAggregatePercent";
193
194
195
196  /**
197   * The name of the attribute that contains the total number of operations of
198   * all types within each processing time bucket.
199   */
200  @NotNull private static final String ATTR_ALL_COUNT = "allOpsCount";
201
202
203
204  /**
205   * The name of the attribute that contains the percentage of operations of all
206   * types within each processing time bucket.
207   */
208  @NotNull private static final String ATTR_ALL_PERCENT = "allOpsPercent";
209
210
211
212  /**
213   * The name of the attribute that contains the total number of bind
214   * operations performed in the server.
215   */
216  @NotNull private static final String ATTR_BIND_TOTAL_COUNT =
217       "bindOpsTotalCount";
218
219
220
221  /**
222   * The name of the attribute that contains the average response time in
223   * milliseconds for bind operations performed in the server.
224   */
225  @NotNull private static final String ATTR_BIND_AVERAGE_RESPONSE_TIME_MS =
226       "bindOpsAverageResponseTimeMillis";
227
228
229
230  /**
231   * The name of the attribute that contains the aggregate percentage of bind
232   * operations within each processing time bucket.
233   */
234  @NotNull private static final String ATTR_BIND_AGGREGATE_PERCENT =
235       "bindOpsAggregatePercent";
236
237
238
239  /**
240   * The name of the attribute that contains the total number of bind operations
241   * within each processing time bucket.
242   */
243  @NotNull private static final String ATTR_BIND_COUNT = "bindOpsCount";
244
245
246
247  /**
248   * The name of the attribute that contains the percentage of bind operations
249   * within each processing time bucket.
250   */
251  @NotNull private static final String ATTR_BIND_PERCENT = "bindOpsPercent";
252
253
254
255  /**
256   * The name of the attribute that contains the total number of compare
257   * operations performed in the server.
258   */
259  @NotNull private static final String ATTR_COMPARE_TOTAL_COUNT =
260       "compareOpsTotalCount";
261
262
263
264  /**
265   * The name of the attribute that contains the average response time in
266   * milliseconds for compare operations performed in the server.
267   */
268  @NotNull private static final String ATTR_COMPARE_AVERAGE_RESPONSE_TIME_MS =
269       "compareOpsAverageResponseTimeMillis";
270
271
272
273  /**
274   * The name of the attribute that contains the aggregate percentage of compare
275   * operations within each processing time bucket.
276   */
277  @NotNull private static final String ATTR_COMPARE_AGGREGATE_PERCENT =
278       "compareOpsAggregatePercent";
279
280
281
282  /**
283   * The name of the attribute that contains the total number of compare
284   * operations within each processing time bucket.
285   */
286  @NotNull private static final String ATTR_COMPARE_COUNT = "compareOpsCount";
287
288
289
290  /**
291   * The name of the attribute that contains the percentage of compare
292   * operations within each processing time bucket.
293   */
294  @NotNull private static final String ATTR_COMPARE_PERCENT =
295       "compareOpsPercent";
296
297
298
299  /**
300   * The name of the attribute that contains the total number of delete
301   * operations performed in the server.
302   */
303  @NotNull private static final String ATTR_DELETE_TOTAL_COUNT =
304       "deleteOpsTotalCount";
305
306
307
308  /**
309   * The name of the attribute that contains the average response time in
310   * milliseconds for delete operations performed in the server.
311   */
312  @NotNull private static final String ATTR_DELETE_AVERAGE_RESPONSE_TIME_MS =
313       "deleteOpsAverageResponseTimeMillis";
314
315
316
317  /**
318   * The name of the attribute that contains the aggregate percentage of delete
319   * operations within each processing time bucket.
320   */
321  @NotNull private static final String ATTR_DELETE_AGGREGATE_PERCENT =
322       "deleteOpsAggregatePercent";
323
324
325
326  /**
327   * The name of the attribute that contains the total number of delete
328   * operations within each processing time bucket.
329   */
330  @NotNull private static final String ATTR_DELETE_COUNT = "deleteOpsCount";
331
332
333
334  /**
335   * The name of the attribute that contains the percentage of delete operations
336   * within each processing time bucket.
337   */
338  @NotNull private static final String ATTR_DELETE_PERCENT =
339       "deleteOpsPercent";
340
341
342
343  /**
344   * The name of the attribute that contains the total number of extended
345   * operations performed in the server.
346   */
347  @NotNull private static final String ATTR_EXTENDED_TOTAL_COUNT =
348       "extendedOpsTotalCount";
349
350
351
352  /**
353   * The name of the attribute that contains the average response time in
354   * milliseconds for extended operations performed in the server.
355   */
356  @NotNull private static final String ATTR_EXTENDED_AVERAGE_RESPONSE_TIME_MS =
357       "extendedOpsAverageResponseTimeMillis";
358
359
360
361  /**
362   * The name of the attribute that contains the aggregate percentage of
363   * extended operations within each processing time bucket.
364   */
365  @NotNull private static final String ATTR_EXTENDED_AGGREGATE_PERCENT =
366       "extendedOpsAggregatePercent";
367
368
369
370  /**
371   * The name of the attribute that contains the total number of extended
372   * operations within each processing time bucket.
373   */
374  @NotNull private static final String ATTR_EXTENDED_COUNT = "extendedOpsCount";
375
376
377
378  /**
379   * The name of the attribute that contains the percentage of extended
380   * operations within each processing time bucket.
381   */
382  @NotNull private static final String ATTR_EXTENDED_PERCENT =
383       "extendedOpsPercent";
384
385
386
387  /**
388   * The name of the attribute that contains the total number of modify
389   * operations performed in the server.
390   */
391  @NotNull private static final String ATTR_MODIFY_TOTAL_COUNT =
392       "modifyOpsTotalCount";
393
394
395
396  /**
397   * The name of the attribute that contains the average response time in
398   * milliseconds for modify operations performed in the server.
399   */
400  @NotNull private static final String ATTR_MODIFY_AVERAGE_RESPONSE_TIME_MS =
401       "modifyOpsAverageResponseTimeMillis";
402
403
404
405  /**
406   * The name of the attribute that contains the aggregate percentage of modify
407   * operations within each processing time bucket.
408   */
409  @NotNull private static final String ATTR_MODIFY_AGGREGATE_PERCENT =
410       "modifyOpsAggregatePercent";
411
412
413
414  /**
415   * The name of the attribute that contains the total number of modify
416   * operations within each processing time bucket.
417   */
418  @NotNull private static final String ATTR_MODIFY_COUNT = "modifyOpsCount";
419
420
421
422  /**
423   * The name of the attribute that contains the percentage of modify operations
424   * within each processing time bucket.
425   */
426  @NotNull private static final String ATTR_MODIFY_PERCENT = "modifyOpsPercent";
427
428
429
430  /**
431   * The name of the attribute that contains the total number of modify DN
432   * operations performed in the server.
433   */
434  @NotNull private static final String ATTR_MODIFY_DN_TOTAL_COUNT =
435       "modifyDNOpsTotalCount";
436
437
438
439  /**
440   * The name of the attribute that contains the average response time in
441   * milliseconds for modify DN operations performed in the server.
442   */
443  @NotNull private static final String ATTR_MODIFY_DN_AVERAGE_RESPONSE_TIME_MS =
444       "modifyDNOpsAverageResponseTimeMillis";
445
446
447
448  /**
449   * The name of the attribute that contains the aggregate percentage of modify
450   * DN operations within each processing time bucket.
451   */
452  @NotNull private static final String ATTR_MODIFY_DN_AGGREGATE_PERCENT =
453       "modifyDNOpsAggregatePercent";
454
455
456
457  /**
458   * The name of the attribute that contains the total number of modify DN
459   * operations within each processing time bucket.
460   */
461  @NotNull private static final String ATTR_MODIFY_DN_COUNT =
462       "modifyDNOpsCount";
463
464
465
466  /**
467   * The name of the attribute that contains the percentage of modify DN
468   * operations within each processing time bucket.
469   */
470  @NotNull private static final String ATTR_MODIFY_DN_PERCENT =
471       "modifyDNOpsPercent";
472
473
474
475  /**
476   * The name of the attribute that contains the total number of search
477   * operations performed in the server.
478   */
479  @NotNull private static final String ATTR_SEARCH_TOTAL_COUNT =
480       "searchOpsTotalCount";
481
482
483
484  /**
485   * The name of the attribute that contains the average response time in
486   * milliseconds for search operations performed in the server.
487   */
488  @NotNull private static final String ATTR_SEARCH_AVERAGE_RESPONSE_TIME_MS =
489       "searchOpsAverageResponseTimeMillis";
490
491
492
493  /**
494   * The name of the attribute that contains the aggregate percentage of search
495   * operations within each processing time bucket.
496   */
497  @NotNull private static final String ATTR_SEARCH_AGGREGATE_PERCENT =
498       "searchOpsAggregatePercent";
499
500
501
502  /**
503   * The name of the attribute that contains the total number of search
504   * operations within each processing time bucket.
505   */
506  @NotNull private static final String ATTR_SEARCH_COUNT = "searchOpsCount";
507
508
509
510  /**
511   * The name of the attribute that contains the percentage of search operations
512   * within each processing time bucket.
513   */
514  @NotNull private static final String ATTR_SEARCH_PERCENT = "searchOpsPercent";
515
516
517
518  /**
519   * The serial version UID for this serializable class.
520   */
521  private static final long serialVersionUID = -2498009928344820276L;
522
523
524
525  // The percent of add operations in each bucket.
526  @NotNull private final Map<Long,Double> addOpsPercent;
527
528  // The aggregate percent of add operations in each bucket.
529  @NotNull private final Map<Long,Double> addOpsAggregatePercent;
530
531  // The percent of operations of all types in each bucket.
532  @NotNull private final Map<Long,Double> allOpsPercent;
533
534  // The aggregate percent of operations of all types in each bucket.
535  @NotNull private final Map<Long,Double> allOpsAggregatePercent;
536
537  // The percent of bind operations in each bucket.
538  @NotNull private final Map<Long,Double> bindOpsPercent;
539
540  // The aggregate percent of bind operations in each bucket.
541  @NotNull private final Map<Long,Double> bindOpsAggregatePercent;
542
543  // The percent of compare operations in each bucket.
544  @NotNull private final Map<Long,Double> compareOpsPercent;
545
546  // The aggregate percent of compare operations in each bucket.
547  @NotNull private final Map<Long,Double> compareOpsAggregatePercent;
548
549  // The percent of delete operations in each bucket.
550  @NotNull private final Map<Long,Double> deleteOpsPercent;
551
552  // The aggregate percent of delete operations in each bucket.
553  @NotNull private final Map<Long,Double> deleteOpsAggregatePercent;
554
555  // The percent of extended operations in each bucket.
556  @NotNull private final Map<Long,Double> extendedOpsPercent;
557
558  // The aggregate percent of extended operations in each bucket.
559  @NotNull private final Map<Long,Double> extendedOpsAggregatePercent;
560
561  // The percent of modify operations in each bucket.
562  @NotNull private final Map<Long,Double> modifyOpsPercent;
563
564  // The aggregate percent of modify operations in each bucket.
565  @NotNull private final Map<Long,Double> modifyOpsAggregatePercent;
566
567  // The percent of modify DN operations in each bucket.
568  @NotNull private final Map<Long,Double> modifyDNOpsPercent;
569
570  // The aggregate percent of modify DN operations in each bucket.
571  @NotNull private final Map<Long,Double> modifyDNOpsAggregatePercent;
572
573  // The percent of search operations in each bucket.
574  @NotNull private final Map<Long,Double> searchOpsPercent;
575
576  // The aggregate percent of search operations in each bucket.
577  @NotNull private final Map<Long,Double> searchOpsAggregatePercent;
578
579  // The number of add operations in each bucket.
580  @NotNull private final Map<Long,Long> addOpsCount;
581
582  // The number of operations of all types in each bucket.
583  @NotNull private final Map<Long,Long> allOpsCount;
584
585  // The number of bind operations in each bucket.
586  @NotNull private final Map<Long,Long> bindOpsCount;
587
588  // The number of compare operations in each bucket.
589  @NotNull private final Map<Long,Long> compareOpsCount;
590
591  // The number of delete operations in each bucket.
592  @NotNull private final Map<Long,Long> deleteOpsCount;
593
594  // The number of extended operations in each bucket.
595  @NotNull private final Map<Long,Long> extendedOpsCount;
596
597  // The number of modify operations in each bucket.
598  @NotNull private final Map<Long,Long> modifyOpsCount;
599
600  // The number of modifyDN operations in each bucket.
601  @NotNull private final Map<Long,Long> modifyDNOpsCount;
602
603  // The number of search operations in each bucket.
604  @NotNull private final Map<Long,Long> searchOpsCount;
605
606  // The total number of add operations.
607  @Nullable private final Long addOpsTotalCount;
608
609  // The total number of all operations.
610  @Nullable private final Long allOpsTotalCount;
611
612  // The total number of bind operations.
613  @Nullable private final Long bindOpsTotalCount;
614
615  // The total number of compare operations.
616  @Nullable private final Long compareOpsTotalCount;
617
618  // The total number of delete operations.
619  @Nullable private final Long deleteOpsTotalCount;
620
621  // The total number of extended operations.
622  @Nullable private final Long extendedOpsTotalCount;
623
624  // The total number of modify operations.
625  @Nullable private final Long modifyOpsTotalCount;
626
627  // The total number of modify DN operations.
628  @Nullable private final Long modifyDNOpsTotalCount;
629
630  // The total number of search operations.
631  @Nullable private final Long searchOpsTotalCount;
632
633  // The average response time in milliseconds for add operations.
634  @Nullable private final Double addOpsAvgResponseTimeMillis;
635
636  // The average response time in milliseconds for all operations.
637  @Nullable private final Double allOpsAvgResponseTimeMillis;
638
639  // The average response time in milliseconds for bind operations.
640  @Nullable private final Double bindOpsAvgResponseTimeMillis;
641
642  // The average response time in milliseconds for compare operations.
643  @Nullable private final Double compareOpsAvgResponseTimeMillis;
644
645  // The average response time in milliseconds for delete operations.
646  @Nullable private final Double deleteOpsAvgResponseTimeMillis;
647
648  // The average response time in milliseconds for extended operations.
649  @Nullable private final Double extendedOpsAvgResponseTimeMillis;
650
651  // The average response time in milliseconds for modify operations.
652  @Nullable private final Double modifyOpsAvgResponseTimeMillis;
653
654  // The average response time in milliseconds for modify DN operations.
655  @Nullable private final Double modifyDNOpsAvgResponseTimeMillis;
656
657  // The average response time in milliseconds for search operations.
658  @Nullable private final Double searchOpsAvgResponseTimeMillis;
659
660
661  /**
662   * Creates a new processing time histogram monitor entry from the provided
663   * entry.
664   *
665   * @param  entry  The entry to be parsed as a processing time histogram
666   *                monitor entry.  It must not be {@code null}.
667   */
668  public ProcessingTimeHistogramMonitorEntry(@NotNull final Entry entry)
669  {
670    super(entry);
671
672    allOpsTotalCount = getLong(ATTR_ALL_TOTAL_COUNT);
673    allOpsAvgResponseTimeMillis = getDouble(ATTR_ALL_AVERAGE_RESPONSE_TIME_MS);
674    allOpsCount = parseCountAttribute(entry, ATTR_ALL_COUNT);
675    allOpsPercent = parsePercentAttribute(entry, ATTR_ALL_PERCENT);
676    allOpsAggregatePercent =
677         parsePercentAttribute(entry, ATTR_ALL_AGGREGATE_PERCENT);
678
679    addOpsTotalCount = getLong(ATTR_ADD_TOTAL_COUNT);
680    addOpsAvgResponseTimeMillis = getDouble(ATTR_ADD_AVERAGE_RESPONSE_TIME_MS);
681    addOpsCount = parseCountAttribute(entry, ATTR_ADD_COUNT);
682    addOpsPercent = parsePercentAttribute(entry, ATTR_ADD_PERCENT);
683    addOpsAggregatePercent =
684         parsePercentAttribute(entry, ATTR_ADD_AGGREGATE_PERCENT);
685
686    bindOpsTotalCount = getLong(ATTR_BIND_TOTAL_COUNT);
687    bindOpsAvgResponseTimeMillis =
688         getDouble(ATTR_BIND_AVERAGE_RESPONSE_TIME_MS);
689    bindOpsCount = parseCountAttribute(entry, ATTR_BIND_COUNT);
690    bindOpsPercent = parsePercentAttribute(entry, ATTR_BIND_PERCENT);
691    bindOpsAggregatePercent =
692         parsePercentAttribute(entry, ATTR_BIND_AGGREGATE_PERCENT);
693
694    compareOpsTotalCount = getLong(ATTR_COMPARE_TOTAL_COUNT);
695    compareOpsAvgResponseTimeMillis =
696         getDouble(ATTR_COMPARE_AVERAGE_RESPONSE_TIME_MS);
697    compareOpsCount = parseCountAttribute(entry, ATTR_COMPARE_COUNT);
698    compareOpsPercent = parsePercentAttribute(entry, ATTR_COMPARE_PERCENT);
699    compareOpsAggregatePercent =
700         parsePercentAttribute(entry, ATTR_COMPARE_AGGREGATE_PERCENT);
701
702    deleteOpsTotalCount = getLong(ATTR_DELETE_TOTAL_COUNT);
703    deleteOpsAvgResponseTimeMillis =
704         getDouble(ATTR_DELETE_AVERAGE_RESPONSE_TIME_MS);
705    deleteOpsCount = parseCountAttribute(entry, ATTR_DELETE_COUNT);
706    deleteOpsPercent = parsePercentAttribute(entry, ATTR_DELETE_PERCENT);
707    deleteOpsAggregatePercent =
708         parsePercentAttribute(entry, ATTR_DELETE_AGGREGATE_PERCENT);
709
710    extendedOpsTotalCount = getLong(ATTR_EXTENDED_TOTAL_COUNT);
711    extendedOpsAvgResponseTimeMillis =
712         getDouble(ATTR_EXTENDED_AVERAGE_RESPONSE_TIME_MS);
713    extendedOpsCount = parseCountAttribute(entry, ATTR_EXTENDED_COUNT);
714    extendedOpsPercent = parsePercentAttribute(entry, ATTR_EXTENDED_PERCENT);
715    extendedOpsAggregatePercent =
716         parsePercentAttribute(entry, ATTR_EXTENDED_AGGREGATE_PERCENT);
717
718    modifyOpsTotalCount = getLong(ATTR_MODIFY_TOTAL_COUNT);
719    modifyOpsAvgResponseTimeMillis =
720         getDouble(ATTR_MODIFY_AVERAGE_RESPONSE_TIME_MS);
721    modifyOpsCount = parseCountAttribute(entry, ATTR_MODIFY_COUNT);
722    modifyOpsPercent = parsePercentAttribute(entry, ATTR_MODIFY_PERCENT);
723    modifyOpsAggregatePercent =
724         parsePercentAttribute(entry, ATTR_MODIFY_AGGREGATE_PERCENT);
725
726    modifyDNOpsTotalCount = getLong(ATTR_MODIFY_DN_TOTAL_COUNT);
727    modifyDNOpsAvgResponseTimeMillis =
728         getDouble(ATTR_MODIFY_DN_AVERAGE_RESPONSE_TIME_MS);
729    modifyDNOpsCount = parseCountAttribute(entry, ATTR_MODIFY_DN_COUNT);
730    modifyDNOpsPercent = parsePercentAttribute(entry, ATTR_MODIFY_DN_PERCENT);
731    modifyDNOpsAggregatePercent =
732         parsePercentAttribute(entry, ATTR_MODIFY_DN_AGGREGATE_PERCENT);
733
734    searchOpsTotalCount = getLong(ATTR_SEARCH_TOTAL_COUNT);
735    searchOpsAvgResponseTimeMillis =
736         getDouble(ATTR_SEARCH_AVERAGE_RESPONSE_TIME_MS);
737    searchOpsCount = parseCountAttribute(entry, ATTR_SEARCH_COUNT);
738    searchOpsPercent = parsePercentAttribute(entry, ATTR_SEARCH_PERCENT);
739    searchOpsAggregatePercent =
740         parsePercentAttribute(entry, ATTR_SEARCH_AGGREGATE_PERCENT);
741  }
742
743
744
745  /**
746   * Parses the value of a specified attribute to obtain a mapping between the
747   * lower bucket boundary and an integer value.
748   *
749   * @param  entry  The entry containing the data to process.
750   * @param  name   The name of the attribute containing the data to process.
751   *
752   * @return  A map with the parsed information, or an empty map if the
753   *          specified attribute did not exist or could not be parsed.
754   */
755  @NotNull()
756  private static Map<Long,Long> parseCountAttribute(@NotNull final Entry entry,
757                                                    @NotNull final String name)
758  {
759    final String[] values = entry.getAttributeValues(name);
760    if ((values == null) || (values.length == 0))
761    {
762      return Collections.emptyMap();
763    }
764
765    try
766    {
767      final LinkedHashMap<Long,Long> map =
768           new LinkedHashMap<>(StaticUtils.computeMapCapacity(50));
769
770      // FIXME -- Do we need to figure out how to make this
771      // internationalizeable?
772
773      // The lower bound for the first bucket will always be zero, so just look
774      // for the colon to separate the label from the value.
775      int colonPos = values[0].indexOf(':');
776      map.put(0L, Long.parseLong(values[0].substring(colonPos+1).trim()));
777
778      // For remaining values, the lower bound will be the number immediately
779      // after "Between " and immediately before "ms".
780      for (int i=1; i < values.length; i++)
781      {
782        final long lowerBound;
783        int msPos = values[i].indexOf("ms ");
784        if (msPos < 0)
785        {
786          // This must be the last value.
787          msPos = values[i].indexOf("ms:");
788          lowerBound = Long.parseLong(values[i].substring(9, msPos));
789        }
790        else
791        {
792          lowerBound = Long.parseLong(values[i].substring(8, msPos));
793        }
794
795        colonPos = values[i].indexOf(':', msPos);
796        map.put(lowerBound,
797                Long.parseLong(values[i].substring(colonPos+1).trim()));
798      }
799
800      return Collections.unmodifiableMap(map);
801    }
802    catch (final Exception e)
803    {
804      Debug.debugException(e);
805      return Collections.emptyMap();
806    }
807  }
808
809
810
811  /**
812   * Parses the value of a specified attribute to obtain a mapping between the
813   * lower bucket boundary and a floating-point value.
814   *
815   * @param  entry  The entry containing the data to process.
816   * @param  name   The name of the attribute containing the data to process.
817   *
818   * @return  A map with the parsed information, or an empty map if the
819   *          specified attribute did not exist or could not be parsed.
820   */
821  @NotNull()
822  private static Map<Long,Double> parsePercentAttribute(
823               @NotNull final Entry entry,
824               @NotNull final String name)
825  {
826    final String[] values = entry.getAttributeValues(name);
827    if ((values == null) || (values.length == 0))
828    {
829      return Collections.emptyMap();
830    }
831
832    try
833    {
834      final LinkedHashMap<Long,Double> map =
835           new LinkedHashMap<>(StaticUtils.computeMapCapacity(50));
836
837      // FIXME -- Do we need to figure out how to make this
838      // internationalizeable?
839
840      // The standard percent histogram attributes will always use the following
841      // pattern:
842      // - One "Less than Xms: N.NNNN%" line.
843      // - Zero or more "Between Xms and Yms: N.NNNN%" lines.
844      // - One "At least Xms: N.NNNN%" line.
845      //
846      // The aggregate percent histogram attributes may use the above pattern,
847      // or they may instead use the following alternate pattern (which will
848      // have one less value because the last aggregate percent is known to be
849      // 100% and will be implied rather than explicitly stated):
850      // - One or more "Less than Xms: N.NNNN%" lines.
851      //
852      // We need to support both formats.
853      boolean atLeastFound = false;
854      long lastUpperBound = 0L;
855      for (final String s : values)
856      {
857        final int colonPos = s.indexOf(':');
858        final int pctPos = s.indexOf('%', colonPos);
859        final double percent =
860             Double.parseDouble(s.substring(colonPos+1, pctPos));
861
862        final int msPos = s.indexOf("ms");
863        if (s.startsWith("Less than "))
864        {
865          map.put(lastUpperBound, percent);
866          lastUpperBound = Long.parseLong(s.substring(10, msPos));
867        }
868        else if (s.startsWith("Between "))
869        {
870          final long lowerBound = Long.parseLong(s.substring(8, msPos));
871          map.put(lowerBound, percent);
872
873          final int secondMSPos =  s.indexOf("ms:", msPos+1);
874          lastUpperBound = Long.parseLong(s.substring(msPos+7, secondMSPos));
875        }
876        else
877        {
878          atLeastFound = true;
879          final long lowerBound = Long.parseLong(s.substring(9, msPos));
880          map.put(lowerBound, percent);
881        }
882      }
883
884      if (! atLeastFound)
885      {
886        map.put(lastUpperBound, 100.0d);
887      }
888
889      return Collections.unmodifiableMap(map);
890    }
891    catch (final Exception e)
892    {
893      Debug.debugException(e);
894      return Collections.emptyMap();
895    }
896  }
897
898
899
900  /**
901   * Retrieves the total number of operations that have been performed in the
902   * server.
903   *
904   * @return  The total number of operations that have been performed in the
905   *          server, or {@code null} if it was not included in the monitor
906   *          entry.
907   */
908  @Nullable()
909  public final Long getAllOpsTotalCount()
910  {
911    return allOpsTotalCount;
912  }
913
914
915
916  /**
917   * Retrieves the average response time in milliseconds of all operations
918   * of all types performed in the server.
919   *
920   * @return  The average response time in milliseconds of all operations of all
921   *          types performed in the server, or {@code null} if it was not
922   *          included in the monitor entry.
923   */
924  @Nullable()
925  public final Double getAllOpsAverageResponseTimeMillis()
926  {
927    return allOpsAvgResponseTimeMillis;
928  }
929
930
931
932  /**
933   * Retrieves a map with information about the total number of operations of
934   * all types within each of the response time buckets.  The mapping will be
935   * between the lower bound for the processing time bucket in milliseconds and
936   * the number of operations whose processing time fell within that bucket.
937   *
938   * @return  A map with information about the total number of operations of all
939   *          types within each of the response time buckets, or an empty map if
940   *          it was not included in the monitor entry.
941   */
942  @NotNull()
943  public final Map<Long,Long> getAllOpsCount()
944  {
945    return allOpsCount;
946  }
947
948
949
950  /**
951   * Retrieves a map with information about the percentage of operations of
952   * all types within each of the response time buckets.  The mapping will be
953   * between the lower bound for the processing time bucket in milliseconds and
954   * the percentage of operations whose processing time fell within that bucket.
955   *
956   * @return  A map with information about the percentage of operations of all
957   *          types within each of the response time buckets, or an empty map if
958   *          it was not included in the monitor entry.
959   */
960  @NotNull()
961  public final Map<Long,Double> getAllOpsPercent()
962  {
963    return allOpsPercent;
964  }
965
966
967
968  /**
969   * Retrieves a map with information about the aggregate percentage of
970   * operations of all types within each of the response time buckets or one of
971   * the lower response time buckets.  The mapping will be between the lower
972   * bound for the processing time bucket in milliseconds and the aggregate
973   * percentage of operations whose processing time fell within that or lower
974   * response time buckets.
975   *
976   * @return  A map with information about the aggregate percentage of
977   *          operations of all types within each of the response time buckets,
978   *          or an empty map if it was not included in the monitor entry.
979   */
980  @NotNull()
981  public final Map<Long,Double> getAllOpsAggregatePercent()
982  {
983    return allOpsAggregatePercent;
984  }
985
986
987
988  /**
989   * Retrieves the total number of add operations that have been performed
990   * in the server.
991   *
992   * @return  The total number of add operations that have been performed in the
993   *          server, or {@code null} if it was not included in the monitor
994   *          entry.
995   */
996  @Nullable()
997  public final Long getAddOpsTotalCount()
998  {
999    return addOpsTotalCount;
1000  }
1001
1002
1003
1004  /**
1005   * Retrieves the average response time in milliseconds of add operations
1006   * performed in the server.
1007   *
1008   * @return  The average response time in milliseconds of add operations
1009   *          that have been performed in the server, or {@code null} if it was
1010   *          not included in the monitor entry.
1011   */
1012  @Nullable()
1013  public final Double getAddOpsAverageResponseTimeMillis()
1014  {
1015    return addOpsAvgResponseTimeMillis;
1016  }
1017
1018
1019
1020  /**
1021   * Retrieves a map with information about the total number of add operations
1022   * within each of the response time buckets.  The mapping will be between
1023   * the lower bound for the processing time bucket in milliseconds and the
1024   * number of operations whose processing time fell within that bucket.
1025   *
1026   * @return  A map with information about the total number of add operations
1027   *          within each of the response time buckets, or an empty map if it
1028   *          was not included in the monitor entry.
1029   */
1030  @NotNull()
1031  public final Map<Long,Long> getAddOpsCount()
1032  {
1033    return addOpsCount;
1034  }
1035
1036
1037
1038  /**
1039   * Retrieves a map with information about the percentage of add operations
1040   * within each of the response time buckets.  The mapping will be between the
1041   * lower bound for the processing time bucket in milliseconds and the
1042   * percentage of operations whose processing time fell within that bucket.
1043   *
1044   * @return  A map with information about the percentage of add operations
1045   *          within each of the response time buckets, or an empty map if it
1046   *          was not included in the monitor entry.
1047   */
1048  @NotNull()
1049  public final Map<Long,Double> getAddOpsPercent()
1050  {
1051    return addOpsPercent;
1052  }
1053
1054
1055
1056  /**
1057   * Retrieves a map with information about the aggregate percentage of add
1058   * operations within each of the response time buckets or one of the lower
1059   * response time buckets.  The mapping will be between the lower bound for the
1060   * processing time bucket in milliseconds and the aggregate percentage of
1061   * operations whose processing time fell within that or lower response time
1062   * buckets.
1063   *
1064   * @return  A map with information about the aggregate percentage of add
1065   *          operations within each of the response time buckets, or an empty
1066   *          map if it was not included in the monitor entry.
1067   */
1068  @NotNull()
1069  public final Map<Long,Double> getAddOpsAggregatePercent()
1070  {
1071    return addOpsAggregatePercent;
1072  }
1073
1074
1075
1076  /**
1077   * Retrieves the total number of bind operations that have been performed
1078   * in the server.
1079   *
1080   * @return  The total number of bind operations that have been performed in
1081   *          the server, or {@code null} if it was not included in the monitor
1082   *          entry.
1083   */
1084  @Nullable()
1085  public final Long getBindOpsTotalCount()
1086  {
1087    return bindOpsTotalCount;
1088  }
1089
1090
1091
1092  /**
1093   * Retrieves the average response time in milliseconds of bind operations
1094   * performed in the server.
1095   *
1096   * @return  The average response time in milliseconds of bind operations
1097   *          that have been performed in the server, or {@code null} if it was
1098   *          not included in the monitor entry.
1099   */
1100  @Nullable()
1101  public final Double getBindOpsAverageResponseTimeMillis()
1102  {
1103    return bindOpsAvgResponseTimeMillis;
1104  }
1105
1106
1107
1108  /**
1109   * Retrieves a map with information about the total number of bind operations
1110   * within each of the response time buckets.  The mapping will be between
1111   * the lower bound for the processing time bucket in milliseconds and the
1112   * number of operations whose processing time fell within that bucket.
1113   *
1114   * @return  A map with information about the total number of bind operations
1115   *          within each of the response time buckets, or an empty map if it
1116   *          was not included in the monitor entry.
1117   */
1118  @NotNull()
1119  public final Map<Long,Long> getBindOpsCount()
1120  {
1121    return bindOpsCount;
1122  }
1123
1124
1125
1126  /**
1127   * Retrieves a map with information about the percentage of bind operations
1128   * within each of the response time buckets.  The mapping will be between the
1129   * lower bound for the processing time bucket in milliseconds and the
1130   * percentage of operations whose processing time fell within that bucket.
1131   *
1132   * @return  A map with information about the percentage of bind operations
1133   *          within each of the response time buckets, or an empty map if it
1134   *          was not included in the monitor entry.
1135   */
1136  @NotNull()
1137  public final Map<Long,Double> getBindOpsPercent()
1138  {
1139    return bindOpsPercent;
1140  }
1141
1142
1143
1144  /**
1145   * Retrieves a map with information about the aggregate percentage of bind
1146   * operations within each of the response time buckets or one of the lower
1147   * response time buckets.  The mapping will be between the lower bound for the
1148   * processing time bucket in milliseconds and the aggregate percentage of
1149   * operations whose processing time fell within that or lower response time
1150   * buckets.
1151   *
1152   * @return  A map with information about the aggregate percentage of bind
1153   *          operations within each of the response time buckets, or an empty
1154   *          map if it was not included in the monitor entry.
1155   */
1156  @NotNull()
1157  public final Map<Long,Double> getBindOpsAggregatePercent()
1158  {
1159    return bindOpsAggregatePercent;
1160  }
1161
1162
1163
1164  /**
1165   * Retrieves the total number of compare operations that have been performed
1166   * in the server.
1167   *
1168   * @return  The total number of compare operations that have been performed in
1169   *          the server, or {@code null} if it was not included in the monitor
1170   *          entry.
1171   */
1172  @Nullable()
1173  public final Long getCompareOpsTotalCount()
1174  {
1175    return compareOpsTotalCount;
1176  }
1177
1178
1179
1180  /**
1181   * Retrieves the average response time in milliseconds of compare operations
1182   * performed in the server.
1183   *
1184   * @return  The average response time in milliseconds of compare operations
1185   *          that have been performed in the server, or {@code null} if it was
1186   *          not included in the monitor entry.
1187   */
1188  @Nullable()
1189  public final Double getCompareOpsAverageResponseTimeMillis()
1190  {
1191    return compareOpsAvgResponseTimeMillis;
1192  }
1193
1194
1195
1196  /**
1197   * Retrieves a map with information about the total number of compare
1198   * operations within each of the response time buckets.  The mapping will
1199   * be between the lower bound for the processing time bucket in milliseconds
1200   * and the number of operations whose processing time fell within that bucket.
1201   *
1202   * @return  A map with information about the total number of compare
1203   *          operations within each of the response time buckets, or an empty
1204   *          map if it was not included in the monitor entry.
1205   */
1206  @NotNull()
1207  public final Map<Long,Long> getCompareOpsCount()
1208  {
1209    return compareOpsCount;
1210  }
1211
1212
1213
1214  /**
1215   * Retrieves a map with information about the percentage of compare operations
1216   * within each of the response time buckets.  The mapping will be between the
1217   * lower bound for the processing time bucket in milliseconds and the
1218   * percentage of operations whose processing time fell within that bucket.
1219   *
1220   * @return  A map with information about the percentage of compare operations
1221   *          within each of the response time buckets, or an empty map if it
1222   *          was not included in the monitor entry.
1223   */
1224  @NotNull()
1225  public final Map<Long,Double> getCompareOpsPercent()
1226  {
1227    return compareOpsPercent;
1228  }
1229
1230
1231
1232  /**
1233   * Retrieves a map with information about the aggregate percentage of compare
1234   * operations within each of the response time buckets or one of the lower
1235   * response time buckets.  The mapping will be between the lower bound for the
1236   * processing time bucket in milliseconds and the aggregate percentage of
1237   * operations whose processing time fell within that or lower response time
1238   * buckets.
1239   *
1240   * @return  A map with information about the aggregate percentage of compare
1241   *          operations within each of the response time buckets, or an empty
1242   *          map if it was not included in the monitor entry.
1243   */
1244  @NotNull()
1245  public final Map<Long,Double> getCompareOpsAggregatePercent()
1246  {
1247    return compareOpsAggregatePercent;
1248  }
1249
1250
1251
1252  /**
1253   * Retrieves the total number of delete operations that have been performed
1254   * in the server.
1255   *
1256   * @return  The total number of delete operations that have been performed in
1257   *          the server, or {@code null} if it was not included in the monitor
1258   *          entry.
1259   */
1260  @Nullable()
1261  public final Long getDeleteOpsTotalCount()
1262  {
1263    return deleteOpsTotalCount;
1264  }
1265
1266
1267
1268  /**
1269   * Retrieves the average response time in milliseconds of delete operations
1270   * performed in the server.
1271   *
1272   * @return  The average response time in milliseconds of delete operations
1273   *          that have been performed in the server, or {@code null} if it was
1274   *          not included in the monitor entry.
1275   */
1276  @Nullable()
1277  public final Double getDeleteOpsAverageResponseTimeMillis()
1278  {
1279    return deleteOpsAvgResponseTimeMillis;
1280  }
1281
1282
1283
1284  /**
1285   * Retrieves a map with information about the total number of delete
1286   * operations within each of the response time buckets.  The mapping will
1287   * be between the lower bound for the processing time bucket in milliseconds
1288   * and the number of operations whose processing time fell within that bucket.
1289   *
1290   * @return  A map with information about the total number of delete
1291   *          operations within each of the response time buckets, or an empty
1292   *          map if it was not included in the monitor entry.
1293   */
1294  @NotNull()
1295  public final Map<Long,Long> getDeleteOpsCount()
1296  {
1297    return deleteOpsCount;
1298  }
1299
1300
1301
1302  /**
1303   * Retrieves a map with information about the percentage of delete operations
1304   * within each of the response time buckets.  The mapping will be between the
1305   * lower bound for the processing time bucket in milliseconds and the
1306   * percentage of operations whose processing time fell within that bucket.
1307   *
1308   * @return  A map with information about the percentage of delete operations
1309   *          within each of the response time buckets, or an empty map if it
1310   *          was not included in the monitor entry.
1311   */
1312  @NotNull()
1313  public final Map<Long,Double> getDeleteOpsPercent()
1314  {
1315    return deleteOpsPercent;
1316  }
1317
1318
1319
1320  /**
1321   * Retrieves a map with information about the aggregate percentage of delete
1322   * operations within each of the response time buckets or one of the lower
1323   * response time buckets.  The mapping will be between the lower bound for the
1324   * processing time bucket in milliseconds and the aggregate percentage of
1325   * operations whose processing time fell within that or lower response time
1326   * buckets.
1327   *
1328   * @return  A map with information about the aggregate percentage of delete
1329   *          operations within each of the response time buckets, or an empty
1330   *          map if it was not included in the monitor entry.
1331   */
1332  @NotNull()
1333  public final Map<Long,Double> getDeleteOpsAggregatePercent()
1334  {
1335    return deleteOpsAggregatePercent;
1336  }
1337
1338
1339
1340  /**
1341   * Retrieves the total number of extended operations that have been performed
1342   * in the server.
1343   *
1344   * @return  The total number of extended operations that have been performed
1345   *          in the server, or {@code null} if it was not included in the
1346   *          monitor entry.
1347   */
1348  @Nullable()
1349  public final Long getExtendedOpsTotalCount()
1350  {
1351    return extendedOpsTotalCount;
1352  }
1353
1354
1355
1356  /**
1357   * Retrieves the average response time in milliseconds of extended operations
1358   * performed in the server.
1359   *
1360   * @return  The average response time in milliseconds of extended operations
1361   *          that have been performed in the server, or {@code null} if it was
1362   *          not included in the monitor entry.
1363   */
1364  @Nullable()
1365  public final Double getExtendedOpsAverageResponseTimeMillis()
1366  {
1367    return extendedOpsAvgResponseTimeMillis;
1368  }
1369
1370
1371
1372  /**
1373   * Retrieves a map with information about the total number of extended
1374   * operations within each of the response time buckets.  The mapping will be
1375   * between the lower bound for the processing time bucket in milliseconds and
1376   * the number of operations whose processing time fell within that bucket.
1377   *
1378   * @return  A map with information about the total number of extended
1379   *          operations within each of the response time buckets, or an empty
1380   *          map if it was not included in the monitor entry.
1381   */
1382  @NotNull()
1383  public final Map<Long,Long> getExtendedOpsCount()
1384  {
1385    return extendedOpsCount;
1386  }
1387
1388
1389
1390  /**
1391   * Retrieves a map with information about the percentage of extended
1392   * operations within each of the response time buckets.  The mapping will be
1393   * between the lower bound for the processing time bucket in milliseconds and
1394   * the percentage of operations whose processing time fell within that bucket.
1395   *
1396   * @return  A map with information about the percentage of extended operations
1397   *          within each of the response time buckets, or an empty map if it
1398   *          was not included in the monitor entry.
1399   */
1400  @NotNull()
1401  public final Map<Long,Double> getExtendedOpsPercent()
1402  {
1403    return extendedOpsPercent;
1404  }
1405
1406
1407
1408  /**
1409   * Retrieves a map with information about the aggregate percentage of extended
1410   * operations within each of the response time buckets or one of the lower
1411   * response time buckets.  The mapping will be between the lower bound for the
1412   * processing time bucket in milliseconds and the aggregate percentage of
1413   * operations whose processing time fell within that or lower response time
1414   * buckets.
1415   *
1416   * @return  A map with information about the aggregate percentage of extended
1417   *          operations within each of the response time buckets, or an empty
1418   *          map if it was not included in the monitor entry.
1419   */
1420  @NotNull()
1421  public final Map<Long,Double> getExtendedOpsAggregatePercent()
1422  {
1423    return extendedOpsAggregatePercent;
1424  }
1425
1426
1427
1428  /**
1429   * Retrieves the total number of modify operations that have been performed
1430   * in the server.
1431   *
1432   * @return  The total number of modify operations that have been performed in
1433   *          the server, or {@code null} if it was not included in the monitor
1434   *          entry.
1435   */
1436  @Nullable()
1437  public final Long getModifyOpsTotalCount()
1438  {
1439    return modifyOpsTotalCount;
1440  }
1441
1442
1443
1444  /**
1445   * Retrieves the average response time in milliseconds of modify operations
1446   * performed in the server.
1447   *
1448   * @return  The average response time in milliseconds of modify operations
1449   *          that have been performed in the server, or {@code null} if it was
1450   *          not included in the monitor entry.
1451   */
1452  @Nullable()
1453  public final Double getModifyOpsAverageResponseTimeMillis()
1454  {
1455    return modifyOpsAvgResponseTimeMillis;
1456  }
1457
1458
1459
1460  /**
1461   * Retrieves a map with information about the total number of modify
1462   * operations within each of the response time buckets.  The mapping will
1463   * be between the lower bound for the processing time bucket in milliseconds
1464   * and the number of operations whose processing time fell within that bucket.
1465   *
1466   * @return  A map with information about the total number of modify
1467   *          operations within each of the response time buckets, or an empty
1468   *          map if it was not included in the monitor entry.
1469   */
1470  @NotNull()
1471  public final Map<Long,Long> getModifyOpsCount()
1472  {
1473    return modifyOpsCount;
1474  }
1475
1476
1477
1478  /**
1479   * Retrieves a map with information about the percentage of modify operations
1480   * within each of the response time buckets.  The mapping will be between the
1481   * lower bound for the processing time bucket in milliseconds and the
1482   * percentage of operations whose processing time fell within that bucket.
1483   *
1484   * @return  A map with information about the percentage of modify operations
1485   *          within each of the response time buckets, or an empty map if it
1486   *          was not included in the monitor entry.
1487   */
1488  @NotNull()
1489  public final Map<Long,Double> getModifyOpsPercent()
1490  {
1491    return modifyOpsPercent;
1492  }
1493
1494
1495
1496  /**
1497   * Retrieves a map with information about the aggregate percentage of modify
1498   * operations within each of the response time buckets or one of the lower
1499   * response time buckets.  The mapping will be between the lower bound for the
1500   * processing time bucket in milliseconds and the aggregate percentage of
1501   * operations whose processing time fell within that or lower response time
1502   * buckets.
1503   *
1504   * @return  A map with information about the aggregate percentage of modify
1505   *          operations within each of the response time buckets, or an empty
1506   *          map if it was not included in the monitor entry.
1507   */
1508  @NotNull()
1509  public final Map<Long,Double> getModifyOpsAggregatePercent()
1510  {
1511    return modifyOpsAggregatePercent;
1512  }
1513
1514
1515
1516  /**
1517   * Retrieves a map with information about the total number of modify DN
1518   * operations within each of the response time buckets.  The mapping will
1519   * be between the lower bound for the processing time bucket in milliseconds
1520   * and the number of operations whose processing time fell within that bucket.
1521   *
1522   * @return  A map with information about the total number of modify DN
1523   *          operations within each of the response time buckets, or an empty
1524   *          map if it was not included in the monitor entry.
1525   */
1526  @NotNull()
1527  public final Map<Long,Long> getModifyDNOpsCount()
1528  {
1529    return modifyDNOpsCount;
1530  }
1531
1532
1533
1534  /**
1535   * Retrieves the total number of modify DN operations that have been performed
1536   * in the server.
1537   *
1538   * @return  The total number of modify DN operations that have been performed
1539   *          in the server, or {@code null} if it was not included in the
1540   *          monitor entry.
1541   */
1542  @Nullable()
1543  public final Long getModifyDNOpsTotalCount()
1544  {
1545    return modifyDNOpsTotalCount;
1546  }
1547
1548
1549
1550  /**
1551   * Retrieves the average response time in milliseconds of modify DN operations
1552   * performed in the server.
1553   *
1554   * @return  The average response time in milliseconds of modify DN operations
1555   *          that have been performed in the server, or {@code null} if it was
1556   *          not included in the monitor entry.
1557   */
1558  @Nullable()
1559  public final Double getModifyDNOpsAverageResponseTimeMillis()
1560  {
1561    return modifyDNOpsAvgResponseTimeMillis;
1562  }
1563
1564
1565
1566  /**
1567   * Retrieves a map with information about the percentage of modify DN
1568   * operations within each of the response time buckets.  The mapping will be
1569   * between the lower bound for the processing time bucket in milliseconds and
1570   * the percentage of operations whose processing time fell within that bucket.
1571   *
1572   * @return  A map with information about the percentage of modify DN
1573   *          operations within each of the response time buckets, or an empty
1574   *          map if it was not included in the monitor entry.
1575   */
1576  @NotNull()
1577  public final Map<Long,Double> getModifyDNOpsPercent()
1578  {
1579    return modifyDNOpsPercent;
1580  }
1581
1582
1583
1584  /**
1585   * Retrieves a map with information about the aggregate percentage of modify
1586   * DN operations within each of the response time buckets or one of the lower
1587   * response time buckets.  The mapping will be between the lower bound for the
1588   * processing time bucket in milliseconds and the aggregate percentage of
1589   * operations whose processing time fell within that or lower response time
1590   * buckets.
1591   *
1592   * @return  A map with information about the aggregate percentage of modify DN
1593   *          operations within each of the response time buckets, or an empty
1594   *          map if it was not included in the monitor entry.
1595   */
1596  @NotNull()
1597  public final Map<Long,Double> getModifyDNOpsAggregatePercent()
1598  {
1599    return modifyDNOpsAggregatePercent;
1600  }
1601
1602
1603
1604  /**
1605   * Retrieves the total number of search operations that have been performed
1606   * in the server.
1607   *
1608   * @return  The total number of search operations that have been performed in
1609   *          the server, or {@code null} if it was not included in the monitor
1610   *          entry.
1611   */
1612  @Nullable()
1613  public final Long getSearchOpsTotalCount()
1614  {
1615    return searchOpsTotalCount;
1616  }
1617
1618
1619
1620  /**
1621   * Retrieves the average response time in milliseconds of search operations
1622   * performed in the server.
1623   *
1624   * @return  The average response time in milliseconds of search operations
1625   *          that have been performed in the server, or {@code null} if it was
1626   *          not included in the monitor entry.
1627   */
1628  @Nullable()
1629  public final Double getSearchOpsAverageResponseTimeMillis()
1630  {
1631    return searchOpsAvgResponseTimeMillis;
1632  }
1633
1634
1635
1636  /**
1637   * Retrieves a map with information about the total number of search
1638   * operations within each of the response time buckets.  The mapping will
1639   * be between the lower bound for the processing time bucket in milliseconds
1640   * and the number of operations whose processing time fell within that bucket.
1641   *
1642   * @return  A map with information about the total number of search
1643   *          operations within each of the response time buckets, or an empty
1644   *          map if it was not included in the monitor entry.
1645   */
1646  @NotNull()
1647  public final Map<Long,Long> getSearchOpsCount()
1648  {
1649    return searchOpsCount;
1650  }
1651
1652
1653
1654  /**
1655   * Retrieves a map with information about the percentage of search operations
1656   * within each of the response time buckets.  The mapping will be between the
1657   * lower bound for the processing time bucket in milliseconds and the
1658   * percentage of operations whose processing time fell within that bucket.
1659   *
1660   * @return  A map with information about the percentage of search operations
1661   *          within each of the response time buckets, or an empty map if it
1662   *          was not included in the monitor entry.
1663   */
1664  @NotNull()
1665  public final Map<Long,Double> getSearchOpsPercent()
1666  {
1667    return searchOpsPercent;
1668  }
1669
1670
1671
1672  /**
1673   * Retrieves a map with information about the aggregate percentage of search
1674   * operations within each of the response time buckets or one of the lower
1675   * response time buckets.  The mapping will be between the lower bound for the
1676   * processing time bucket in milliseconds and the aggregate percentage of
1677   * operations whose processing time fell within that or lower response time
1678   * buckets.
1679   *
1680   * @return  A map with information about the aggregate percentage of search
1681   *          operations within each of the response time buckets, or an empty
1682   *          map if it was not included in the monitor entry.
1683   */
1684  @NotNull()
1685  public final Map<Long,Double> getSearchOpsAggregatePercent()
1686  {
1687    return searchOpsAggregatePercent;
1688  }
1689
1690
1691
1692  /**
1693   * {@inheritDoc}
1694   */
1695  @Override()
1696  @NotNull()
1697  public String getMonitorDisplayName()
1698  {
1699    return INFO_PROCESSING_TIME_MONITOR_DISPNAME.get();
1700  }
1701
1702
1703
1704  /**
1705   * {@inheritDoc}
1706   */
1707  @Override()
1708  @NotNull()
1709  public String getMonitorDescription()
1710  {
1711    return INFO_PROCESSING_TIME_MONITOR_DESC.get();
1712  }
1713
1714
1715
1716  /**
1717   * {@inheritDoc}
1718   */
1719  @Override()
1720  @NotNull()
1721  public Map<String,MonitorAttribute> getMonitorAttributes()
1722  {
1723    final LinkedHashMap<String,MonitorAttribute> attrs =
1724         new LinkedHashMap<>(StaticUtils.computeMapCapacity(50));
1725
1726    if (allOpsTotalCount != null)
1727    {
1728      addMonitorAttribute(attrs,
1729           ATTR_ALL_TOTAL_COUNT,
1730           INFO_PROCESSING_TIME_DISPNAME_ALL_TOTAL_COUNT.get(),
1731           INFO_PROCESSING_TIME_DESC_ALL_TOTAL_COUNT.get(),
1732           allOpsTotalCount);
1733    }
1734
1735    if (allOpsAvgResponseTimeMillis != null)
1736    {
1737      addMonitorAttribute(attrs,
1738           ATTR_ALL_AVERAGE_RESPONSE_TIME_MS,
1739           INFO_PROCESSING_TIME_DISPNAME_ALL_TOTAL_TIME.get(),
1740           INFO_PROCESSING_TIME_DESC_ALL_TOTAL_TIME.get(),
1741           allOpsAvgResponseTimeMillis);
1742    }
1743
1744    if (! allOpsCount.isEmpty())
1745    {
1746      final Iterator<Long> iterator = allOpsCount.keySet().iterator();
1747      Long lastValue = iterator.next();
1748
1749      while (iterator.hasNext())
1750      {
1751        final Long value = iterator.next();
1752        addMonitorAttribute(attrs,
1753             "allOpsCount-" + lastValue + '-' + value,
1754             INFO_PROCESSING_TIME_DISPNAME_ALL_COUNT.get(lastValue, value),
1755             INFO_PROCESSING_TIME_DESC_ALL_COUNT.get(lastValue, value),
1756             allOpsCount.get(lastValue));
1757
1758        lastValue = value;
1759        if (! iterator.hasNext())
1760        {
1761          addMonitorAttribute(attrs,
1762               "allOpsCount-" + lastValue,
1763               INFO_PROCESSING_TIME_DISPNAME_ALL_COUNT_LAST.get(lastValue),
1764               INFO_PROCESSING_TIME_DESC_ALL_COUNT_LAST.get(lastValue),
1765               allOpsCount.get(lastValue));
1766        }
1767      }
1768    }
1769
1770    if (! allOpsPercent.isEmpty())
1771    {
1772      final Iterator<Long> iterator = allOpsPercent.keySet().iterator();
1773      Long lastValue = iterator.next();
1774
1775      while (iterator.hasNext())
1776      {
1777        final Long value = iterator.next();
1778        addMonitorAttribute(attrs,
1779             "allOpsPct-" + lastValue + '-' + value,
1780             INFO_PROCESSING_TIME_DISPNAME_ALL_PCT.get(lastValue, value),
1781             INFO_PROCESSING_TIME_DESC_ALL_PCT.get(lastValue, value),
1782             allOpsPercent.get(lastValue));
1783
1784        lastValue = value;
1785        if (! iterator.hasNext())
1786        {
1787          addMonitorAttribute(attrs,
1788               "allOpsPct-" + lastValue,
1789               INFO_PROCESSING_TIME_DISPNAME_ALL_PCT_LAST.get(lastValue),
1790               INFO_PROCESSING_TIME_DESC_ALL_PCT_LAST.get(lastValue),
1791               allOpsPercent.get(lastValue));
1792        }
1793      }
1794    }
1795
1796    if (! allOpsAggregatePercent.isEmpty())
1797    {
1798      final Iterator<Long> iterator =
1799           allOpsAggregatePercent.keySet().iterator();
1800      Long lastValue = iterator.next();
1801
1802      while (iterator.hasNext())
1803      {
1804        final Long value = iterator.next();
1805        addMonitorAttribute(attrs,
1806             "allOpsAggrPct-" + lastValue + '-' + value,
1807             INFO_PROCESSING_TIME_DISPNAME_ALL_AGGR_PCT.get(lastValue, value),
1808             INFO_PROCESSING_TIME_DESC_ALL_AGGR_PCT.get(lastValue, value),
1809             allOpsAggregatePercent.get(lastValue));
1810
1811        lastValue = value;
1812      }
1813    }
1814
1815    if (addOpsTotalCount != null)
1816    {
1817      addMonitorAttribute(attrs,
1818           ATTR_ADD_TOTAL_COUNT,
1819           INFO_PROCESSING_TIME_DISPNAME_ADD_TOTAL_COUNT.get(),
1820           INFO_PROCESSING_TIME_DESC_ADD_TOTAL_COUNT.get(),
1821           addOpsTotalCount);
1822    }
1823
1824    if (addOpsAvgResponseTimeMillis != null)
1825    {
1826      addMonitorAttribute(attrs,
1827           ATTR_ADD_AVERAGE_RESPONSE_TIME_MS,
1828           INFO_PROCESSING_TIME_DISPNAME_ADD_TOTAL_TIME.get(),
1829           INFO_PROCESSING_TIME_DESC_ADD_TOTAL_TIME.get(),
1830           addOpsAvgResponseTimeMillis);
1831    }
1832
1833    if (! addOpsCount.isEmpty())
1834    {
1835      final Iterator<Long> iterator = addOpsCount.keySet().iterator();
1836      Long lastValue = iterator.next();
1837
1838      while (iterator.hasNext())
1839      {
1840        final Long value = iterator.next();
1841        addMonitorAttribute(attrs,
1842             "addOpsCount-" + lastValue + '-' + value,
1843             INFO_PROCESSING_TIME_DISPNAME_ADD_COUNT.get(lastValue, value),
1844             INFO_PROCESSING_TIME_DESC_ADD_COUNT.get(lastValue, value),
1845             addOpsCount.get(lastValue));
1846
1847        lastValue = value;
1848        if (! iterator.hasNext())
1849        {
1850          addMonitorAttribute(attrs,
1851               "addOpsCount-" + lastValue,
1852               INFO_PROCESSING_TIME_DISPNAME_ADD_COUNT_LAST.get(lastValue),
1853               INFO_PROCESSING_TIME_DESC_ADD_COUNT_LAST.get(lastValue),
1854               addOpsCount.get(lastValue));
1855        }
1856      }
1857    }
1858
1859    if (! addOpsPercent.isEmpty())
1860    {
1861      final Iterator<Long> iterator = addOpsPercent.keySet().iterator();
1862      Long lastValue = iterator.next();
1863
1864      while (iterator.hasNext())
1865      {
1866        final Long value = iterator.next();
1867        addMonitorAttribute(attrs,
1868             "addOpsPct-" + lastValue + '-' + value,
1869             INFO_PROCESSING_TIME_DISPNAME_ADD_PCT.get(lastValue, value),
1870             INFO_PROCESSING_TIME_DESC_ADD_PCT.get(lastValue, value),
1871             addOpsPercent.get(lastValue));
1872
1873        lastValue = value;
1874        if (! iterator.hasNext())
1875        {
1876          addMonitorAttribute(attrs,
1877               "addOpsPct-" + lastValue,
1878               INFO_PROCESSING_TIME_DISPNAME_ADD_PCT_LAST.get(lastValue),
1879               INFO_PROCESSING_TIME_DESC_ADD_PCT_LAST.get(lastValue),
1880               addOpsPercent.get(lastValue));
1881        }
1882      }
1883    }
1884
1885    if (! addOpsAggregatePercent.isEmpty())
1886    {
1887      final Iterator<Long> iterator =
1888           addOpsAggregatePercent.keySet().iterator();
1889      Long lastValue = iterator.next();
1890
1891      while (iterator.hasNext())
1892      {
1893        final Long value = iterator.next();
1894        addMonitorAttribute(attrs,
1895             "addOpsAggrPct-" + lastValue + '-' + value,
1896             INFO_PROCESSING_TIME_DISPNAME_ADD_AGGR_PCT.get(lastValue, value),
1897             INFO_PROCESSING_TIME_DESC_ADD_AGGR_PCT.get(lastValue, value),
1898             addOpsAggregatePercent.get(lastValue));
1899
1900        lastValue = value;
1901      }
1902    }
1903
1904    if (bindOpsTotalCount != null)
1905    {
1906      addMonitorAttribute(attrs,
1907           ATTR_BIND_TOTAL_COUNT,
1908           INFO_PROCESSING_TIME_DISPNAME_BIND_TOTAL_COUNT.get(),
1909           INFO_PROCESSING_TIME_DESC_BIND_TOTAL_COUNT.get(),
1910           bindOpsTotalCount);
1911    }
1912
1913    if (bindOpsAvgResponseTimeMillis != null)
1914    {
1915      addMonitorAttribute(attrs,
1916           ATTR_BIND_AVERAGE_RESPONSE_TIME_MS,
1917           INFO_PROCESSING_TIME_DISPNAME_BIND_TOTAL_TIME.get(),
1918           INFO_PROCESSING_TIME_DESC_BIND_TOTAL_TIME.get(),
1919           bindOpsAvgResponseTimeMillis);
1920    }
1921
1922    if (! bindOpsCount.isEmpty())
1923    {
1924      final Iterator<Long> iterator = bindOpsCount.keySet().iterator();
1925      Long lastValue = iterator.next();
1926
1927      while (iterator.hasNext())
1928      {
1929        final Long value = iterator.next();
1930        addMonitorAttribute(attrs,
1931             "bindOpsCount-" + lastValue + '-' + value,
1932             INFO_PROCESSING_TIME_DISPNAME_BIND_COUNT.get(lastValue, value),
1933             INFO_PROCESSING_TIME_DESC_BIND_COUNT.get(lastValue, value),
1934             bindOpsCount.get(lastValue));
1935
1936        lastValue = value;
1937        if (! iterator.hasNext())
1938        {
1939          addMonitorAttribute(attrs,
1940               "bindOpsCount-" + lastValue,
1941               INFO_PROCESSING_TIME_DISPNAME_BIND_COUNT_LAST.get(lastValue),
1942               INFO_PROCESSING_TIME_DESC_BIND_COUNT_LAST.get(lastValue),
1943               bindOpsCount.get(lastValue));
1944        }
1945      }
1946    }
1947
1948    if (! bindOpsPercent.isEmpty())
1949    {
1950      final Iterator<Long> iterator = bindOpsPercent.keySet().iterator();
1951      Long lastValue = iterator.next();
1952
1953      while (iterator.hasNext())
1954      {
1955        final Long value = iterator.next();
1956        addMonitorAttribute(attrs,
1957             "bindOpsPct-" + lastValue + '-' + value,
1958             INFO_PROCESSING_TIME_DISPNAME_BIND_PCT.get(lastValue, value),
1959             INFO_PROCESSING_TIME_DESC_BIND_PCT.get(lastValue, value),
1960             bindOpsPercent.get(lastValue));
1961
1962        lastValue = value;
1963        if (! iterator.hasNext())
1964        {
1965          addMonitorAttribute(attrs,
1966               "bindOpsPct-" + lastValue,
1967               INFO_PROCESSING_TIME_DISPNAME_BIND_PCT_LAST.get(lastValue),
1968               INFO_PROCESSING_TIME_DESC_BIND_PCT_LAST.get(lastValue),
1969               bindOpsPercent.get(lastValue));
1970        }
1971      }
1972    }
1973
1974    if (! bindOpsAggregatePercent.isEmpty())
1975    {
1976      final Iterator<Long> iterator =
1977           bindOpsAggregatePercent.keySet().iterator();
1978      Long lastValue = iterator.next();
1979
1980      while (iterator.hasNext())
1981      {
1982        final Long value = iterator.next();
1983        addMonitorAttribute(attrs,
1984             "bindOpsAggrPct-" + lastValue + '-' + value,
1985             INFO_PROCESSING_TIME_DISPNAME_BIND_AGGR_PCT.get(lastValue, value),
1986             INFO_PROCESSING_TIME_DESC_BIND_AGGR_PCT.get(lastValue, value),
1987             bindOpsAggregatePercent.get(lastValue));
1988
1989        lastValue = value;
1990      }
1991    }
1992
1993    if (compareOpsTotalCount != null)
1994    {
1995      addMonitorAttribute(attrs,
1996           ATTR_COMPARE_TOTAL_COUNT,
1997           INFO_PROCESSING_TIME_DISPNAME_COMPARE_TOTAL_COUNT.get(),
1998           INFO_PROCESSING_TIME_DESC_COMPARE_TOTAL_COUNT.get(),
1999           compareOpsTotalCount);
2000    }
2001
2002    if (compareOpsAvgResponseTimeMillis != null)
2003    {
2004      addMonitorAttribute(attrs,
2005           ATTR_COMPARE_AVERAGE_RESPONSE_TIME_MS,
2006           INFO_PROCESSING_TIME_DISPNAME_COMPARE_TOTAL_TIME.get(),
2007           INFO_PROCESSING_TIME_DESC_COMPARE_TOTAL_TIME.get(),
2008           compareOpsAvgResponseTimeMillis);
2009    }
2010
2011    if (! compareOpsCount.isEmpty())
2012    {
2013      final Iterator<Long> iterator = compareOpsCount.keySet().iterator();
2014      Long lastValue = iterator.next();
2015
2016      while (iterator.hasNext())
2017      {
2018        final Long value = iterator.next();
2019        addMonitorAttribute(attrs,
2020             "compareOpsCount-" + lastValue + '-' + value,
2021             INFO_PROCESSING_TIME_DISPNAME_COMPARE_COUNT.get(lastValue, value),
2022             INFO_PROCESSING_TIME_DESC_COMPARE_COUNT.get(lastValue, value),
2023             compareOpsCount.get(lastValue));
2024
2025        lastValue = value;
2026        if (! iterator.hasNext())
2027        {
2028          addMonitorAttribute(attrs,
2029               "compareOpsCount-" + lastValue,
2030               INFO_PROCESSING_TIME_DISPNAME_COMPARE_COUNT_LAST.get(lastValue),
2031               INFO_PROCESSING_TIME_DESC_COMPARE_COUNT_LAST.get(lastValue),
2032               compareOpsCount.get(lastValue));
2033        }
2034      }
2035    }
2036
2037    if (! compareOpsPercent.isEmpty())
2038    {
2039      final Iterator<Long> iterator = compareOpsPercent.keySet().iterator();
2040      Long lastValue = iterator.next();
2041
2042      while (iterator.hasNext())
2043      {
2044        final Long value = iterator.next();
2045        addMonitorAttribute(attrs,
2046             "compareOpsPct-" + lastValue + '-' + value,
2047             INFO_PROCESSING_TIME_DISPNAME_COMPARE_PCT.get(lastValue, value),
2048             INFO_PROCESSING_TIME_DESC_COMPARE_PCT.get(lastValue, value),
2049             compareOpsPercent.get(lastValue));
2050
2051        lastValue = value;
2052        if (! iterator.hasNext())
2053        {
2054          addMonitorAttribute(attrs,
2055               "compareOpsPct-" + lastValue,
2056               INFO_PROCESSING_TIME_DISPNAME_COMPARE_PCT_LAST.get(lastValue),
2057               INFO_PROCESSING_TIME_DESC_COMPARE_PCT_LAST.get(lastValue),
2058               compareOpsPercent.get(lastValue));
2059        }
2060      }
2061    }
2062
2063    if (! compareOpsAggregatePercent.isEmpty())
2064    {
2065      final Iterator<Long> iterator =
2066           compareOpsAggregatePercent.keySet().iterator();
2067      Long lastValue = iterator.next();
2068
2069      while (iterator.hasNext())
2070      {
2071        final Long value = iterator.next();
2072        addMonitorAttribute(attrs,
2073             "compareOpsAggrPct-" + lastValue + '-' + value,
2074             INFO_PROCESSING_TIME_DISPNAME_COMPARE_AGGR_PCT.get(lastValue,
2075                                                                value),
2076             INFO_PROCESSING_TIME_DESC_COMPARE_AGGR_PCT.get(lastValue, value),
2077             compareOpsAggregatePercent.get(lastValue));
2078
2079        lastValue = value;
2080      }
2081    }
2082
2083    if (deleteOpsTotalCount != null)
2084    {
2085      addMonitorAttribute(attrs,
2086           ATTR_DELETE_TOTAL_COUNT,
2087           INFO_PROCESSING_TIME_DISPNAME_DELETE_TOTAL_COUNT.get(),
2088           INFO_PROCESSING_TIME_DESC_DELETE_TOTAL_COUNT.get(),
2089           deleteOpsTotalCount);
2090    }
2091
2092    if (deleteOpsAvgResponseTimeMillis != null)
2093    {
2094      addMonitorAttribute(attrs,
2095           ATTR_DELETE_AVERAGE_RESPONSE_TIME_MS,
2096           INFO_PROCESSING_TIME_DISPNAME_DELETE_TOTAL_TIME.get(),
2097           INFO_PROCESSING_TIME_DESC_DELETE_TOTAL_TIME.get(),
2098           deleteOpsAvgResponseTimeMillis);
2099    }
2100
2101    if (! deleteOpsCount.isEmpty())
2102    {
2103      final Iterator<Long> iterator = deleteOpsCount.keySet().iterator();
2104      Long lastValue = iterator.next();
2105
2106      while (iterator.hasNext())
2107      {
2108        final Long value = iterator.next();
2109        addMonitorAttribute(attrs,
2110             "deleteOpsCount-" + lastValue + '-' + value,
2111             INFO_PROCESSING_TIME_DISPNAME_DELETE_COUNT.get(lastValue, value),
2112             INFO_PROCESSING_TIME_DESC_DELETE_COUNT.get(lastValue, value),
2113             deleteOpsCount.get(lastValue));
2114
2115        lastValue = value;
2116        if (! iterator.hasNext())
2117        {
2118          addMonitorAttribute(attrs,
2119               "deleteOpsCount-" + lastValue,
2120               INFO_PROCESSING_TIME_DISPNAME_DELETE_COUNT_LAST.get(lastValue),
2121               INFO_PROCESSING_TIME_DESC_DELETE_COUNT_LAST.get(lastValue),
2122               deleteOpsCount.get(lastValue));
2123        }
2124      }
2125    }
2126
2127    if (! deleteOpsPercent.isEmpty())
2128    {
2129      final Iterator<Long> iterator = deleteOpsPercent.keySet().iterator();
2130      Long lastValue = iterator.next();
2131
2132      while (iterator.hasNext())
2133      {
2134        final Long value = iterator.next();
2135        addMonitorAttribute(attrs,
2136             "deleteOpsPct-" + lastValue + '-' + value,
2137             INFO_PROCESSING_TIME_DISPNAME_DELETE_PCT.get(lastValue, value),
2138             INFO_PROCESSING_TIME_DESC_DELETE_PCT.get(lastValue, value),
2139             deleteOpsPercent.get(lastValue));
2140
2141        lastValue = value;
2142        if (! iterator.hasNext())
2143        {
2144          addMonitorAttribute(attrs,
2145               "deleteOpsPct-" + lastValue,
2146               INFO_PROCESSING_TIME_DISPNAME_DELETE_PCT_LAST.get(lastValue),
2147               INFO_PROCESSING_TIME_DESC_DELETE_PCT_LAST.get(lastValue),
2148               deleteOpsPercent.get(lastValue));
2149        }
2150      }
2151    }
2152
2153    if (! deleteOpsAggregatePercent.isEmpty())
2154    {
2155      final Iterator<Long> iterator =
2156           deleteOpsAggregatePercent.keySet().iterator();
2157      Long lastValue = iterator.next();
2158
2159      while (iterator.hasNext())
2160      {
2161        final Long value = iterator.next();
2162        addMonitorAttribute(attrs,
2163             "deleteOpsAggrPct-" + lastValue + '-' + value,
2164             INFO_PROCESSING_TIME_DISPNAME_DELETE_AGGR_PCT.get(lastValue,
2165                                                               value),
2166             INFO_PROCESSING_TIME_DESC_DELETE_AGGR_PCT.get(lastValue, value),
2167             deleteOpsAggregatePercent.get(lastValue));
2168
2169        lastValue = value;
2170      }
2171    }
2172
2173    if (extendedOpsTotalCount != null)
2174    {
2175      addMonitorAttribute(attrs,
2176           ATTR_EXTENDED_TOTAL_COUNT,
2177           INFO_PROCESSING_TIME_DISPNAME_EXTENDED_TOTAL_COUNT.get(),
2178           INFO_PROCESSING_TIME_DESC_EXTENDED_TOTAL_COUNT.get(),
2179           extendedOpsTotalCount);
2180    }
2181
2182    if (extendedOpsAvgResponseTimeMillis != null)
2183    {
2184      addMonitorAttribute(attrs,
2185           ATTR_EXTENDED_AVERAGE_RESPONSE_TIME_MS,
2186           INFO_PROCESSING_TIME_DISPNAME_EXTENDED_TOTAL_TIME.get(),
2187           INFO_PROCESSING_TIME_DESC_EXTENDED_TOTAL_TIME.get(),
2188           extendedOpsAvgResponseTimeMillis);
2189    }
2190
2191    if (! extendedOpsCount.isEmpty())
2192    {
2193      final Iterator<Long> iterator = extendedOpsCount.keySet().iterator();
2194      Long lastValue = iterator.next();
2195
2196      while (iterator.hasNext())
2197      {
2198        final Long value = iterator.next();
2199        addMonitorAttribute(attrs,
2200             "extendedOpsCount-" + lastValue + '-' + value,
2201             INFO_PROCESSING_TIME_DISPNAME_EXTENDED_COUNT.get(lastValue, value),
2202             INFO_PROCESSING_TIME_DESC_EXTENDED_COUNT.get(lastValue, value),
2203             extendedOpsCount.get(lastValue));
2204
2205        lastValue = value;
2206        if (! iterator.hasNext())
2207        {
2208          addMonitorAttribute(attrs,
2209               "extendedOpsCount-" + lastValue,
2210               INFO_PROCESSING_TIME_DISPNAME_EXTENDED_COUNT_LAST.get(lastValue),
2211               INFO_PROCESSING_TIME_DESC_EXTENDED_COUNT_LAST.get(lastValue),
2212               extendedOpsCount.get(lastValue));
2213        }
2214      }
2215    }
2216
2217    if (! extendedOpsPercent.isEmpty())
2218    {
2219      final Iterator<Long> iterator = extendedOpsPercent.keySet().iterator();
2220      Long lastValue = iterator.next();
2221
2222      while (iterator.hasNext())
2223      {
2224        final Long value = iterator.next();
2225        addMonitorAttribute(attrs,
2226             "extendedOpsPct-" + lastValue + '-' + value,
2227             INFO_PROCESSING_TIME_DISPNAME_EXTENDED_PCT.get(lastValue, value),
2228             INFO_PROCESSING_TIME_DESC_EXTENDED_PCT.get(lastValue, value),
2229             extendedOpsPercent.get(lastValue));
2230
2231        lastValue = value;
2232        if (! iterator.hasNext())
2233        {
2234          addMonitorAttribute(attrs,
2235               "extendedOpsPct-" + lastValue,
2236               INFO_PROCESSING_TIME_DISPNAME_EXTENDED_PCT_LAST.get(lastValue),
2237               INFO_PROCESSING_TIME_DESC_EXTENDED_PCT_LAST.get(lastValue),
2238               extendedOpsPercent.get(lastValue));
2239        }
2240      }
2241    }
2242
2243    if (! extendedOpsAggregatePercent.isEmpty())
2244    {
2245      final Iterator<Long> iterator =
2246           extendedOpsAggregatePercent.keySet().iterator();
2247      Long lastValue = iterator.next();
2248
2249      while (iterator.hasNext())
2250      {
2251        final Long value = iterator.next();
2252        addMonitorAttribute(attrs,
2253             "extendedOpsAggrPct-" + lastValue + '-' + value,
2254             INFO_PROCESSING_TIME_DISPNAME_EXTENDED_AGGR_PCT.get(lastValue,
2255                                                                 value),
2256             INFO_PROCESSING_TIME_DESC_EXTENDED_AGGR_PCT.get(lastValue, value),
2257             extendedOpsAggregatePercent.get(lastValue));
2258
2259        lastValue = value;
2260      }
2261    }
2262
2263    if (modifyOpsTotalCount != null)
2264    {
2265      addMonitorAttribute(attrs,
2266           ATTR_MODIFY_TOTAL_COUNT,
2267           INFO_PROCESSING_TIME_DISPNAME_MODIFY_TOTAL_COUNT.get(),
2268           INFO_PROCESSING_TIME_DESC_MODIFY_TOTAL_COUNT.get(),
2269           modifyOpsTotalCount);
2270    }
2271
2272    if (modifyOpsAvgResponseTimeMillis != null)
2273    {
2274      addMonitorAttribute(attrs,
2275           ATTR_MODIFY_AVERAGE_RESPONSE_TIME_MS,
2276           INFO_PROCESSING_TIME_DISPNAME_MODIFY_TOTAL_TIME.get(),
2277           INFO_PROCESSING_TIME_DESC_MODIFY_TOTAL_TIME.get(),
2278           modifyOpsAvgResponseTimeMillis);
2279    }
2280
2281    if (! modifyOpsCount.isEmpty())
2282    {
2283      final Iterator<Long> iterator = modifyOpsCount.keySet().iterator();
2284      Long lastValue = iterator.next();
2285
2286      while (iterator.hasNext())
2287      {
2288        final Long value = iterator.next();
2289        addMonitorAttribute(attrs,
2290             "modifyOpsCount-" + lastValue + '-' + value,
2291             INFO_PROCESSING_TIME_DISPNAME_MODIFY_COUNT.get(lastValue, value),
2292             INFO_PROCESSING_TIME_DESC_MODIFY_COUNT.get(lastValue, value),
2293             modifyOpsCount.get(lastValue));
2294
2295        lastValue = value;
2296        if (! iterator.hasNext())
2297        {
2298          addMonitorAttribute(attrs,
2299               "modifyOpsCount-" + lastValue,
2300               INFO_PROCESSING_TIME_DISPNAME_MODIFY_COUNT_LAST.get(lastValue),
2301               INFO_PROCESSING_TIME_DESC_MODIFY_COUNT_LAST.get(lastValue),
2302               modifyOpsCount.get(lastValue));
2303        }
2304      }
2305    }
2306
2307    if (! modifyOpsPercent.isEmpty())
2308    {
2309      final Iterator<Long> iterator = modifyOpsPercent.keySet().iterator();
2310      Long lastValue = iterator.next();
2311
2312      while (iterator.hasNext())
2313      {
2314        final Long value = iterator.next();
2315        addMonitorAttribute(attrs,
2316             "modifyOpsPct-" + lastValue + '-' + value,
2317             INFO_PROCESSING_TIME_DISPNAME_MODIFY_PCT.get(lastValue, value),
2318             INFO_PROCESSING_TIME_DESC_MODIFY_PCT.get(lastValue, value),
2319             modifyOpsPercent.get(lastValue));
2320
2321        lastValue = value;
2322        if (! iterator.hasNext())
2323        {
2324          addMonitorAttribute(attrs,
2325               "modifyOpsPct-" + lastValue,
2326               INFO_PROCESSING_TIME_DISPNAME_MODIFY_PCT_LAST.get(lastValue),
2327               INFO_PROCESSING_TIME_DESC_MODIFY_PCT_LAST.get(lastValue),
2328               modifyOpsPercent.get(lastValue));
2329        }
2330      }
2331    }
2332
2333    if (! modifyOpsAggregatePercent.isEmpty())
2334    {
2335      final Iterator<Long> iterator =
2336           modifyOpsAggregatePercent.keySet().iterator();
2337      Long lastValue = iterator.next();
2338
2339      while (iterator.hasNext())
2340      {
2341        final Long value = iterator.next();
2342        addMonitorAttribute(attrs,
2343             "modifyOpsAggrPct-" + lastValue + '-' + value,
2344             INFO_PROCESSING_TIME_DISPNAME_MODIFY_AGGR_PCT.get(lastValue,
2345                                                               value),
2346             INFO_PROCESSING_TIME_DESC_MODIFY_AGGR_PCT.get(lastValue, value),
2347             modifyOpsAggregatePercent.get(lastValue));
2348
2349        lastValue = value;
2350      }
2351    }
2352
2353    if (modifyDNOpsTotalCount != null)
2354    {
2355      addMonitorAttribute(attrs,
2356           ATTR_MODIFY_DN_TOTAL_COUNT,
2357           INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_TOTAL_COUNT.get(),
2358           INFO_PROCESSING_TIME_DESC_MODIFY_DN_TOTAL_COUNT.get(),
2359           modifyDNOpsTotalCount);
2360    }
2361
2362    if (modifyDNOpsAvgResponseTimeMillis != null)
2363    {
2364      addMonitorAttribute(attrs,
2365           ATTR_MODIFY_DN_AVERAGE_RESPONSE_TIME_MS,
2366           INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_TOTAL_TIME.get(),
2367           INFO_PROCESSING_TIME_DESC_MODIFY_DN_TOTAL_TIME.get(),
2368           modifyDNOpsAvgResponseTimeMillis);
2369    }
2370
2371    if (! modifyDNOpsCount.isEmpty())
2372    {
2373      final Iterator<Long> iterator = modifyDNOpsCount.keySet().iterator();
2374      Long lastValue = iterator.next();
2375
2376      while (iterator.hasNext())
2377      {
2378        final Long value = iterator.next();
2379        addMonitorAttribute(attrs,
2380             "modifyDNOpsCount-" + lastValue + '-' + value,
2381             INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_COUNT.get(lastValue,
2382                                                               value),
2383             INFO_PROCESSING_TIME_DESC_MODIFY_DN_COUNT.get(lastValue, value),
2384             modifyDNOpsCount.get(lastValue));
2385
2386        lastValue = value;
2387        if (! iterator.hasNext())
2388        {
2389          addMonitorAttribute(attrs,
2390               "modifyDNOpsCount-" + lastValue,
2391               INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_COUNT_LAST.get(
2392                    lastValue),
2393               INFO_PROCESSING_TIME_DESC_MODIFY_DN_COUNT_LAST.get(lastValue),
2394               modifyDNOpsCount.get(lastValue));
2395        }
2396      }
2397    }
2398
2399    if (! modifyDNOpsPercent.isEmpty())
2400    {
2401      final Iterator<Long> iterator = modifyDNOpsPercent.keySet().iterator();
2402      Long lastValue = iterator.next();
2403
2404      while (iterator.hasNext())
2405      {
2406        final Long value = iterator.next();
2407        addMonitorAttribute(attrs,
2408             "modifyDNOpsPct-" + lastValue + '-' + value,
2409             INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_PCT.get(lastValue, value),
2410             INFO_PROCESSING_TIME_DESC_MODIFY_DN_PCT.get(lastValue, value),
2411             modifyDNOpsPercent.get(lastValue));
2412
2413        lastValue = value;
2414        if (! iterator.hasNext())
2415        {
2416          addMonitorAttribute(attrs,
2417               "modifyDNOpsPct-" + lastValue,
2418               INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_PCT_LAST.get(lastValue),
2419               INFO_PROCESSING_TIME_DESC_MODIFY_DN_PCT_LAST.get(lastValue),
2420               modifyDNOpsPercent.get(lastValue));
2421        }
2422      }
2423    }
2424
2425    if (! modifyDNOpsAggregatePercent.isEmpty())
2426    {
2427      final Iterator<Long> iterator =
2428           modifyDNOpsAggregatePercent.keySet().iterator();
2429      Long lastValue = iterator.next();
2430
2431      while (iterator.hasNext())
2432      {
2433        final Long value = iterator.next();
2434        addMonitorAttribute(attrs,
2435             "modifyDNOpsAggrPct-" + lastValue + '-' + value,
2436             INFO_PROCESSING_TIME_DISPNAME_MODIFY_DN_AGGR_PCT.get(lastValue,
2437                                                                  value),
2438             INFO_PROCESSING_TIME_DESC_MODIFY_DN_AGGR_PCT.get(lastValue, value),
2439             modifyDNOpsAggregatePercent.get(lastValue));
2440
2441        lastValue = value;
2442      }
2443    }
2444
2445    if (searchOpsTotalCount != null)
2446    {
2447      addMonitorAttribute(attrs,
2448           ATTR_SEARCH_TOTAL_COUNT,
2449           INFO_PROCESSING_TIME_DISPNAME_SEARCH_TOTAL_COUNT.get(),
2450           INFO_PROCESSING_TIME_DESC_SEARCH_TOTAL_COUNT.get(),
2451           searchOpsTotalCount);
2452    }
2453
2454    if (searchOpsAvgResponseTimeMillis != null)
2455    {
2456      addMonitorAttribute(attrs,
2457           ATTR_SEARCH_AVERAGE_RESPONSE_TIME_MS,
2458           INFO_PROCESSING_TIME_DISPNAME_SEARCH_TOTAL_TIME.get(),
2459           INFO_PROCESSING_TIME_DESC_SEARCH_TOTAL_TIME.get(),
2460           searchOpsAvgResponseTimeMillis);
2461    }
2462
2463    if (! searchOpsCount.isEmpty())
2464    {
2465      final Iterator<Long> iterator = searchOpsCount.keySet().iterator();
2466      Long lastValue = iterator.next();
2467
2468      while (iterator.hasNext())
2469      {
2470        final Long value = iterator.next();
2471        addMonitorAttribute(attrs,
2472             "searchOpsCount-" + lastValue + '-' + value,
2473             INFO_PROCESSING_TIME_DISPNAME_SEARCH_COUNT.get(lastValue, value),
2474             INFO_PROCESSING_TIME_DESC_SEARCH_COUNT.get(lastValue, value),
2475             searchOpsCount.get(lastValue));
2476
2477        lastValue = value;
2478        if (! iterator.hasNext())
2479        {
2480          addMonitorAttribute(attrs,
2481               "searchOpsCount-" + lastValue,
2482               INFO_PROCESSING_TIME_DISPNAME_SEARCH_COUNT_LAST.get(lastValue),
2483               INFO_PROCESSING_TIME_DESC_SEARCH_COUNT_LAST.get(lastValue),
2484               searchOpsCount.get(lastValue));
2485        }
2486      }
2487    }
2488
2489    if (! searchOpsPercent.isEmpty())
2490    {
2491      final Iterator<Long> iterator = searchOpsPercent.keySet().iterator();
2492      Long lastValue = iterator.next();
2493
2494      while (iterator.hasNext())
2495      {
2496        final Long value = iterator.next();
2497        addMonitorAttribute(attrs,
2498             "searchOpsPct-" + lastValue + '-' + value,
2499             INFO_PROCESSING_TIME_DISPNAME_SEARCH_PCT.get(lastValue, value),
2500             INFO_PROCESSING_TIME_DESC_SEARCH_PCT.get(lastValue, value),
2501             searchOpsPercent.get(lastValue));
2502
2503        lastValue = value;
2504        if (! iterator.hasNext())
2505        {
2506          addMonitorAttribute(attrs,
2507               "searchOpsPct-" + lastValue,
2508               INFO_PROCESSING_TIME_DISPNAME_SEARCH_PCT_LAST.get(lastValue),
2509               INFO_PROCESSING_TIME_DESC_SEARCH_PCT_LAST.get(lastValue),
2510               searchOpsPercent.get(lastValue));
2511        }
2512      }
2513    }
2514
2515    if (! searchOpsAggregatePercent.isEmpty())
2516    {
2517      final Iterator<Long> iterator =
2518           searchOpsAggregatePercent.keySet().iterator();
2519      Long lastValue = iterator.next();
2520
2521      while (iterator.hasNext())
2522      {
2523        final Long value = iterator.next();
2524        addMonitorAttribute(attrs,
2525             "searchOpsAggrPct-" + lastValue + '-' + value,
2526             INFO_PROCESSING_TIME_DISPNAME_SEARCH_AGGR_PCT.get(lastValue,
2527                                                               value),
2528             INFO_PROCESSING_TIME_DESC_SEARCH_AGGR_PCT.get(lastValue, value),
2529             searchOpsAggregatePercent.get(lastValue));
2530
2531        lastValue = value;
2532      }
2533    }
2534
2535    return Collections.unmodifiableMap(attrs);
2536  }
2537}