Package org.apache.synapse.aspects.statistics.view

Examples of org.apache.synapse.aspects.statistics.view.Statistics.update()


                        if (startLog.isResponse()) {
                            statistics = statisticsView.getOutStatistics();
                        } else {
                            statistics = statisticsView.getInStatistics();
                        }
                        statistics.update(endLog.getTime() - startLog.getTime(), endLog.isFault());
                        if (endLog.isFault()) {
                            statistics.addErrorLog(endLog.getErrorLog());
                        }
                        break;
                    }
View Full Code Here


                        }
                        break;
                    }
                    case ENDPOINT: {
                        statistics = statisticsView.getInStatistics();
                        statistics.update(endLog.getTime() - startLog.getTime(), endLog.isFault());
                        if (endLog.isFault()) {
                            statistics.addErrorLog(endLog.getErrorLog());
                        }
                        break;
                    }
View Full Code Here

                            inStatistics.addErrorLog(endLog.getErrorLog());
                        }
                        if (!endLog.isEndAnyLog()) {
                            StatisticsLog lastLog = statisticsLogs.get(statisticsLogs.size() - 1);
                            if (lastLog != endLog) {
                                outStatistics.update(
                                        lastLog.getTime() - endLog.getTime(), lastLog.isFault());
                                if (lastLog.isFault()) {
                                    outStatistics.addErrorLog(lastLog.getErrorLog());
                                }
                            }
View Full Code Here

        if (startLog != null && componentType == ComponentType.PROXYSERVICE) {
            Statistics inStatistics = statisticsView.getInStatistics();
            StatisticsLog lastLog = statisticsLogs.get(statisticsLogs.size() - 1);
            if (lastLog != startLog) {
                inStatistics.update(lastLog.getTime() - startLog.getTime(), lastLog.isFault());
            }
        }
    }
}
View Full Code Here

    private long value3 = 220L;

    public void testRecordCreation() {

        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);
View Full Code Here

        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);

        StatisticsRecord record = new StatisticsRecord(resourceId,
                ComponentType.SEQUENCE, true, stats1);
View Full Code Here

        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);

        StatisticsRecord record = new StatisticsRecord(resourceId,
                ComponentType.SEQUENCE, true, stats1);

        assertEquals(1, record.getTotalCount());
View Full Code Here

        assertEquals(Double.valueOf((value2+value3)/2), update.getAvgTime());
    }

    public void testRecordUpdateOperations() {
        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);
View Full Code Here

    public void testRecordUpdateOperations() {
        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);

        StatisticsRecord record = new StatisticsRecord(resourceId,
                ComponentType.SEQUENCE, true, stats1);
        StatisticsRecord update = new StatisticsRecord(resourceId,
View Full Code Here

        Statistics stats1 = new Statistics(resourceId);
        stats1.update(value1, false);

        Statistics stats2 = new Statistics(resourceId);
        stats2.update(value2, false);
        stats2.update(value3, true);

        StatisticsRecord record = new StatisticsRecord(resourceId,
                ComponentType.SEQUENCE, true, stats1);
        StatisticsRecord update = new StatisticsRecord(resourceId,
                ComponentType.SEQUENCE, true, stats2);
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.