@Override
    public Map<Integer, Double> calculate(File experimentDir) throws Exception{
        System.out.println("Generating average uptime for "+experimentDir);
        Map<Integer, List<Double>> averageUptime = new HashMap<Integer, List<Double>>();

        for (File experiment: experimentDir.listFiles()) {
            if (!experiment.isHidden()) {
                Map<Integer, Double> expAverage = calcUptime(experiment);
                for (int i : expAverage.keySet()) {
                    if (!averageUptime.containsKey(i)) {
                        averageUptime.put(i, new ArrayList<Double>());
                    }
                    averageUptime.get(i).add(expAverage.get(i));
                }
            }
        }

        Map<Integer, Double> totalAverage = new HashMap<Integer, Double>();
        for (int key : averageUptime.keySet()) {
            double sum = 0;
            for (double av: averageUptime.get(key)) {
                sum = sum + av;
            }
            sum = sum/averageUptime.get(key).size();
            totalAverage.put(key, sum);
        }
        return totalAverage;
    }