public CPUUtilizationDisplayFilter(final Configuration configuration, final IProjectContext projectContext) { super(configuration, projectContext); // Read the configuration this.numberOfEntries = configuration.getIntProperty(CONFIG_PROPERTY_NAME_NUMBER_OF_ENTRIES); final String[] warningIntervalsAsString = configuration.getStringArrayProperty(CONFIG_PROPERTY_NAME_DISPLAY_WARNING_INTERVALS); this.warningIntervals = new Number[warningIntervalsAsString.length]; for (int i = 0; i < warningIntervalsAsString.length; i++) { this.warningIntervals[i] = Long.parseLong(warningIntervalsAsString[i]); } // Create the display objects this.meterGauge = new MeterGauge(); this.xyplot = new XYPlot(this.numberOfEntries); }
public CPUUtilizationDisplayFilter(final Configuration configuration, final IProjectContext projectContext) { super(configuration, projectContext); // Read the configuration this.numberOfEntries = configuration.getIntProperty(CONFIG_PROPERTY_NAME_NUMBER_OF_ENTRIES); final String[] warningIntervalsAsString = configuration.getStringArrayProperty(CONFIG_PROPERTY_NAME_DISPLAY_WARNING_INTERVALS); this.warningIntervals = new Number[warningIntervalsAsString.length]; for (int i = 0; i < warningIntervalsAsString.length; i++) { this.warningIntervals[i] = Long.parseLong(warningIntervalsAsString[i]); } // Create the display objects this.meterGauge = new MeterGauge(); this.xyplot = new XYPlot(this.numberOfEntries); }
/** * Creates a new instance of this filter. * * @param numberOfEntries * Maximal number of entries in a XYPlot * @param warningIntervals * The intervals for the colors displayed in a XYPlot * @param recordsTimeUnit * Time unit to interpret the timestamp of a record passed to the input port */ public CPUUtilizationDisplayFilter(final int numberOfEntries, final Number[] warningIntervals, final TimeUnit recordsTimeUnit) { this.warningIntervals = warningIntervals.clone(); this.recordsTimeUnit = recordsTimeUnit; // Create the display objects this.meterGauge = new MeterGauge(); this.xyplot = new XYPlot(numberOfEntries); }