Package org.ff4j.audit.graph

Examples of org.ff4j.audit.graph.Curve


        // (1) Loop over expected queues
        for (String name : featNameSet) {
            Queue<Event> myQueue = mapOfEvents.get(name);
            if (myQueue != null) {
                // Current curve
                Curve curve = new Curve(name, startTime, endTime, nbslot);
                for (Iterator<Event> itEvt = myQueue.iterator(); itEvt.hasNext();) {
                    Event evt = itEvt.next();
                    long t = evt.getTimestamp();
                    // Is in target window
                    if (startTime < t && t < endTime) {
                        if (EventType.HIT_FLIPPED.equals(evt.getType())) {
                            long slot = (t - startTime) / curve.getInterval();
                            curve.incrCount((int) slot);
                        }
                    }
                }
                maps.put(name, curve);
            }
View Full Code Here


    }

    /** {@inheritDoc} */
    @Override
    public Curve getTotalHitsCurve(long startTime, long endTime, int nbRecord) {
        Curve curve = new Curve(TITLE_PIE_HITCOUNT, startTime, endTime, nbRecord);
        for (String qName : mapOfEvents.keySet()) {
            Queue< Event > qEvents = mapOfEvents.get(qName);
            for (Event evt : qEvents) {
                long t = evt.getTimestamp();
                if (startTime < t && t < endTime) {
                    long slot = (t - startTime) / curve.getInterval();
                    curve.incrCount((int) slot);
                }
            }
        }
        return curve;
    }
View Full Code Here

        c.set(Calendar.SECOND, 0);
        PieGraph pie = getTotalHitsPie(c.getTimeInMillis(), System.currentTimeMillis());
        sb.append(",\"todayHitsPie\": " + pie);
       
        // Create today curve
        Curve curve = getTotalHitsCurve(c.getTimeInMillis(), System.currentTimeMillis(), 100);
        sb.append(",\"todayHitsCurve\": " + curve);
       
        int total = 0;
        for(PieSector sector : pie.getSectors()) {
            total += sector.getValue();
View Full Code Here

TOP

Related Classes of org.ff4j.audit.graph.Curve

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.