Package org.jboss.dashboard.dataset

Examples of org.jboss.dashboard.dataset.DataSetSettings


    /**
     * Build a 500-row (120 Kb aprox) CSV data set in less than 1 second and using less than 1 Mb Kb of memory.
     */
    @Test
    public void test500Rows() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetSizeInBytes(1024 * 1024);
        dataSetSettings.setMaxDataSetLoadTimeInMillis(1000);

        try {
            memoryProfiler.freeMemory();
            long timeBegin = System.currentTimeMillis();
            long memBegin = memoryProfiler.getMemoryUsedInBytes();
View Full Code Here


    /**
     * Build a 50000-row (12 Mb aprox) data set in less than 5 seconds and using less than 50 Mb of memory (conservative settings).
     */
    @Test
    public void test50000Rows() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(5000);
        dataSetSettings.setMaxDataSetSizeInBytes(50 * 1024 * 1024);

        try {
            memoryProfiler.freeMemory();
            long timeBegin = System.currentTimeMillis();
            long memBegin = memoryProfiler.getMemoryUsedInBytes();
View Full Code Here

    /**
     * Failure test case: Build a 500-row data set in less than 1 millisecond.
     */
    @Test
    public void testLoadTimeExceeded() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(1);
        dataSetSettings.setMaxDataSetSizeInBytes(-1); // Disable memory usage checking.

        try {
            buildDataSet(10, dataProvider, dataLoader);
            failBecauseExceptionWasNotThrown(DataSetException.class);
        } catch (DataSetException e) {
View Full Code Here

    /**
     * Failure test case: Build a 500-row CSV data set using less than 1 byte of memory.
     */
    @Test
    public void testDataSetSizeExceeded() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(-1); // Disable load time checking.
        dataSetSettings.setMaxDataSetSizeInBytes(1);

        try {
            buildDataSet(10, dataProvider, dataLoader);
            failBecauseExceptionWasNotThrown(DataSetException.class);
        } catch (DataSetException e) {
View Full Code Here

    /**
     * Build a 500-row (120 Kb aprox) CSV data set in less than 1 second and using less than 1 Mb Kb of memory.
     */
    @Test
    public void test500Rows() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetSizeInBytes(1024 * 1024);
        dataSetSettings.setMaxDataSetLoadTimeInMillis(1000);

        try {
            memoryProfiler.freeMemory();
            long timeBegin = System.currentTimeMillis();
            long memBegin = memoryProfiler.getMemoryUsedInBytes();
View Full Code Here

    /**
     * Build a 50000-row (12 Mb aprox) data set in less than 5 seconds and using less than 50 Mb of memory (conservative settings).
     */
    @Test
    public void test50000Rows() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(5000);
        dataSetSettings.setMaxDataSetSizeInBytes(50 * 1024 * 1024);

        try {
            memoryProfiler.freeMemory();
            long timeBegin = System.currentTimeMillis();
            long memBegin = memoryProfiler.getMemoryUsedInBytes();
View Full Code Here

    /**
     * Failure test case: Build a 500-row data set in less than 1 millisecond.
     */
    @Test
    public void testLoadTimeExceeded() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(1);
        dataSetSettings.setMaxDataSetSizeInBytes(-1); // Disable memory usage checking.

        try {
            buildDataSet(10, dataProvider, dataLoader);
            failBecauseExceptionWasNotThrown(DataSetException.class);
        } catch (DataSetException e) {
View Full Code Here

    /**
     * Failure test case: Build a 500-row CSV data set using less than 1 byte of memory.
     */
    @Test
    public void testDataSetSizeExceeded() throws Exception {
        DataSetSettings dataSetSettings = DataProviderServices.lookup().getDataSetSettings();
        dataSetSettings.setMaxDataSetLoadTimeInMillis(-1); // Disable load time checking.
        dataSetSettings.setMaxDataSetSizeInBytes(1);

        try {
            buildDataSet(10, dataProvider, dataLoader);
            failBecauseExceptionWasNotThrown(DataSetException.class);
        } catch (DataSetException e) {
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.dataset.DataSetSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.