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