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