12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4984057
27 * @summary Test that monitors can sample a large number of attributes
28 * @author Eamonn McManus
29 * @run clean MultiMonitorTest
30 * @run build MultiMonitorTest
31 * @run main MultiMonitorTest
32 */
33
34 import java.util.*;
35 import javax.management.*;
36 import javax.management.monitor.*;
37
38 /* We create N MBeans and three monitors, one for each different
39 monitor type. Each monitor monitors a single attribute in each of
40 the N MBeans. We arrange for the trigger condition to be
41 satisfied, so the listener we register on each monitor should get N
42 notifications. */
43 public class MultiMonitorTest {
44 static final int N = 100;
45 static final ObjectName[] mbeanNames = new ObjectName[N];
46 static final Monitored[] monitored = new Monitored[N];
47 static final int COUNTER_THRESHOLD = 1000;
48 static final int OVER_COUNTER_THRESHOLD = 2000;
49 static final double GAUGE_THRESHOLD = 1000.0;
50 static final double OVER_GAUGE_THRESHOLD = 2000.0;
51 static final String STRING_TO_COMPARE = "chou";
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4984057
27 * @summary Test that monitors can sample a large number of attributes
28 * @author Eamonn McManus
29 * @run clean MultiMonitorTest
30 * @run build MultiMonitorTest
31 * @run main MultiMonitorTest
32 * @key randomness
33 */
34
35 import java.util.*;
36 import javax.management.*;
37 import javax.management.monitor.*;
38
39 /* We create N MBeans and three monitors, one for each different
40 monitor type. Each monitor monitors a single attribute in each of
41 the N MBeans. We arrange for the trigger condition to be
42 satisfied, so the listener we register on each monitor should get N
43 notifications. */
44 public class MultiMonitorTest {
45 static final int N = 100;
46 static final ObjectName[] mbeanNames = new ObjectName[N];
47 static final Monitored[] monitored = new Monitored[N];
48 static final int COUNTER_THRESHOLD = 1000;
49 static final int OVER_COUNTER_THRESHOLD = 2000;
50 static final double GAUGE_THRESHOLD = 1000.0;
51 static final double OVER_GAUGE_THRESHOLD = 2000.0;
52 static final String STRING_TO_COMPARE = "chou";
|