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