Examples of Rollup


Examples of com.browsermob.pageperf.server.Rollup

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String testId = req.getParameter("testId");
        ChartType type = ChartType.valueOf(req.getParameter("type"));
        Rollup rollup = Rollup.valueOf(req.getParameter("rollup"));
        List<String> args = new ArrayList<String>();
        int i = 1;
        while (true) {
            String arg = req.getParameter("arg" + i);
            if (arg == null) {
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.Rollup

        for (Counter c : counters) {
            Locator locator = Locator.createLocatorFromPathComponents(tenantId == null ? c.getTenant() : tenantId, splitForLocator(c.getName()));
            long sampleCount = bundle.getFlushInterval() > 0
                    ? (long)(c.getRate().doubleValue() * ((double)bundle.getFlushInterval()/1000d))
                    : 1;
            Rollup rollup = new CounterRollup()
                    .withCount(c.getValue())
                    .withRate(c.getRate().doubleValue())
                    .withCount(sampleCount);
            PreaggregatedMetric metric = new PreaggregatedMetric(bundle.getCollectionTime(), locator, DEFAULT_PREAG_TTL, rollup);
            metrics.add(metric);
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.Rollup

        final List<PreaggregatedMetric> metrics = new ArrayList<PreaggregatedMetric>(gauges.size());
        for (Gauge g : gauges) {
            Locator locator = Locator.createLocatorFromPathComponents(tenantId == null ? g.getTenant() : tenantId, splitForLocator(g.getName()));
            Points<SimpleNumber> points = new Points<SimpleNumber>();
            points.add(new Points.Point<SimpleNumber>(bundle.getCollectionTime(), new SimpleNumber(g.getValue())));
            Rollup rollup = GaugeRollup.buildFromRawSamples(points);
            PreaggregatedMetric metric = new PreaggregatedMetric(bundle.getCollectionTime(), locator, DEFAULT_PREAG_TTL, rollup);
            metrics.add(metric);
        }
        return metrics;
    }
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.Rollup

            Locator locator = Locator.createLocatorFromPathComponents(tenant, counter.getName().split(NAME_DELIMITER, -1));
            // flushIntervalMillis could be zero (if not specified in the statsD config).
            long sampleCount = flushIntervalMillis > 0
                    ? (long)(counter.getRate().doubleValue() * ((double)flushIntervalMillis/1000d))
                    : 1;
            Rollup rollup = new CounterRollup()
                    .withCount(resolveNumber(counter.getValue()))
                    .withRate(counter.getRate().doubleValue())
                    .withCount(sampleCount);
            PreaggregatedMetric metric = new PreaggregatedMetric(timestamp, locator, DEFAULT_TTL, rollup);
            list.add(metric);
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.Rollup

        for (Bundle.Gauge gauge : gauges) {
            Locator locator = Locator.createLocatorFromPathComponents(tenant, gauge.getName().split(NAME_DELIMITER, -1));
            Points<SimpleNumber> points = new Points<SimpleNumber>();
            points.add(new Points.Point<SimpleNumber>(timestamp, new SimpleNumber(resolveNumber(gauge.getValue()))));
            try {
                Rollup rollup = GaugeRollup.buildFromRawSamples(points);
                PreaggregatedMetric metric = new PreaggregatedMetric(timestamp, locator, DEFAULT_TTL, rollup);
                list.add(metric);
            } catch (IOException ex) {
                throw new IOError(ex);
            }  
View Full Code Here

Examples of org.apache.pivot.wtk.Rollup

    @Override
    public void install(Component component) {
        super.install(component);

        Rollup rollup = (Rollup)component;

        // Add the rollup button
        rollupButton = new RollupButton();
        rollup.add(rollupButton);

        // Initialize state
        headingChanged(rollup, null);
        contentChanged(rollup, null);
        collapsibleChanged(rollup);
View Full Code Here

Examples of org.apache.pivot.wtk.Rollup

        collapsibleChanged(rollup);
    }

    @Override
    public int getPreferredWidth(int height) {
        Rollup rollup = (Rollup)getComponent();

        Component heading = rollup.getHeading();
        Component content = rollup.getContent();

        int preferredWidth = 0;

        if (heading != null) {
            preferredWidth = heading.getPreferredWidth(-1);
        }

        if (content != null
            && (rollup.isExpanded()
                || (expandTransition != null
                    && !expandTransition.isReversed()))) {
            preferredWidth = Math.max(preferredWidth, content.getPreferredWidth(-1));
        }
View Full Code Here

Examples of org.apache.pivot.wtk.Rollup

        return preferredWidth;
    }

    @Override
    public int getPreferredHeight(int width) {
        Rollup rollup = (Rollup)getComponent();

        Component heading = rollup.getHeading();
        Component content = rollup.getContent();

        int preferredHeight = 0;

        // Calculate our internal width constraint
        if (fill && width >= 0) {
            width = Math.max(width - rollupButton.getPreferredWidth(-1) - buffer, 0);
        } else {
            width = -1;
        }

        if (heading != null) {
            preferredHeight += heading.getPreferredHeight(width);
        }

        if (content != null) {
            if (expandTransition == null) {
                if (rollup.isExpanded()) {
                    preferredHeight += spacing + content.getPreferredHeight(width);
                }
            } else {
                float scale = expandTransition.getScale();
                preferredHeight += (int)(scale * (spacing + content.getPreferredHeight(width)));
View Full Code Here

Examples of org.apache.pivot.wtk.Rollup

        return preferredHeight;
    }

    @Override
    public int getBaseline(int width, int height) {
        Rollup rollup = (Rollup)getComponent();
        Component heading = rollup.getHeading();

        int baseline = -1;

        if (heading != null) {
            int headingWidth, headingHeight;
View Full Code Here

Examples of org.apache.pivot.wtk.Rollup

        return baseline;
    }

    @Override
    public void layout() {
        Rollup rollup = (Rollup)getComponent();

        Component heading = rollup.getHeading();
        Component content = rollup.getContent();

        Dimensions rollupButtonSize = rollupButton.getPreferredSize();
        rollupButton.setSize(rollupButtonSize.width, rollupButtonSize.height);

        int x = rollupButtonSize.width + buffer;
        int y = 0;
        int justifiedWidth = Math.max(getWidth() - rollupButtonSize.width - buffer, 0);

        if (heading != null) {
            int headingWidth, headingHeight;
            if (fill) {
                headingWidth = justifiedWidth;
                headingHeight = heading.getPreferredHeight(headingWidth);
            } else {
                Dimensions headingPreferredSize = heading.getPreferredSize();
                headingWidth = headingPreferredSize.width;
                headingHeight = headingPreferredSize.height;
            }

            heading.setLocation(x, y);
            heading.setSize(headingWidth, headingHeight);

            y += headingHeight + spacing;
        }

        if (content != null) {
            if (rollup.isExpanded()
                || (expandTransition != null
                && !expandTransition.isReversed())) {
                int contentWidth, contentHeight;
                if (fill) {
                    contentWidth = justifiedWidth;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.