@@ -0,0 +1,1959 @@
+package com.hy9be.spaperf.metrics;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * Created by hyou on 7/7/15.%0A */%0Apublic class NetworkMetrics extends BaseMetricGroup %7B%0A    public static String%5B%5D selectedPerformanceCounters = %7B%22xmlhttprequest%22%7D;%0A%0A    public static int previousNetworkActivityCounts = 0;%0A%0A    public NetworkMetrics()  %7B%0A    %7D%0A%0A    public void getResult(List entries) %7B%0A        performanceResult = new HashMap%3CString, double%5B%5D%3E();%0A        HashMap%3CString, Double%3E startTime = new HashMap%3C%3E();%0A        for (int i = 0; i %3C selectedPerformanceCounters.length; i++) %7B%0A            performanceResult.put(selectedPerformanceCounters%5Bi%5D, new double%5B%5D%7B0.0, 0.0, 0.0%7D);%0A            startTime.put(selectedPerformanceCounters%5Bi%5D, 0.0);%0A        %7D%0A%0A        double dur = 0.0;%0A        List%3CMap%3CString, Object%3E%3E networkEntries = new ArrayList%3CMap%3CString, Object%3E%3E();%0A        int currentNetworkActivityCounts = entries.size();%0A        for (int i= previousNetworkActivityCounts; i%3CcurrentNetworkActivityCounts; i++)%0A            networkEntries.add(i-previousNetworkActivityCounts, (Map) entries.get(i));%0A        for(int i=0; i%3CcurrentNetworkActivityCounts - previousNetworkActivityCounts; i++)%0A        %7B%0A            Map%3CString, Object%3E ele = networkEntries.get(i);%0A            for (int j=0; j %3C selectedPerformanceCounters.length; j++)%0A                if(ele.get(%22initiatorType%22).equals(selectedPerformanceCounters%5Bj%5D)) %7B%0A                    dur = Double.parseDouble(ele.get(%22duration%22).toString());%0A                    double%5B%5D curr = performanceResult.get(selectedPerformanceCounters%5Bj%5D);%0A                    curr%5B0%5D += dur;%0A                    curr%5B1%5D = curr%5B1%5D %3E dur ? curr%5B1%5D : dur;%0A                    curr%5B2%5D++;%0A                    performanceResult.put(selectedPerformanceCounters%5Bj%5D, curr);%0A                %7D%0A        %7D%0A        previousNetworkActivityCounts = currentNetworkActivityCounts;%0A    %7D%0A%7D%0A

Add network metrics class