author | iignatyev |
Wed, 02 May 2018 16:43:56 -0700 | |
changeset 49958 | cc29d7717e3a |
permissions | -rw-r--r-- |
49958
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
1 |
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
2 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
3 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
4 |
This code is free software; you can redistribute it and/or modify it |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
5 |
under the terms of the GNU General Public License version 2 only, as |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
6 |
published by the Free Software Foundation. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
7 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
8 |
This code is distributed in the hope that it will be useful, but WITHOUT |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
9 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
10 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
11 |
version 2 for more details (a copy is included in the LICENSE file that |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
12 |
accompanied this code). |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
13 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
14 |
You should have received a copy of the GNU General Public License version |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
15 |
2 along with this work; if not, write to the Free Software Foundation, |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
16 |
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
17 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
18 |
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
19 |
or visit www.oracle.com if you need additional information or have any |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
20 |
questions. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
21 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
22 |
DESCRIPTION |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
23 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
24 |
Tests getThreadAllocatedBytes(long[] id) function of com.sun.management.ThreadMXBean |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
25 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
26 |
This test starts several threads (according test machine processor count). Each |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
27 |
thread allocates different size objects (from 8 bytes to 2 megabytes) during |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
28 |
defined Stresser time (default is 1 minute). After that for each thread allocated |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
29 |
memory is counted and compared to the result of getThreadAllocatedBytes() call. |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
30 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
31 |
Test is executed in following configurations: |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
32 |
ThreadMXBean is accessed |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
33 |
- directly threw ManagementFactory.getThreadMXBean() |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
34 |
- threw default MBeanServer |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
35 |
- threw custom MBeanServer |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
36 |
- threw default Proxy |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
37 |
- threw custom Proxy |
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
38 |
|
cc29d7717e3a
8199375: [TESTBUG] Open source vm testbase monitoring tests
iignatyev
parents:
diff
changeset
|
39 |
COMMENTS |