private long weightedTime(Activity kind) {
        long total = 0L;
        long elapsed = 0L;
        long first = Long.MAX_VALUE;
        long last = 0L;

        if (tracks.isEmpty()) {
            return 0L;
        }
        for (TimeTracker track : tracks) {
            total += track.totalTime();
            elapsed += fetcher(kind, track);
            last = Math.max(last, track.last());
            first = Math.min(first, track.first());
        }
        if (total == 0L) {
            return 0L;
        } else {
            return ((last - first) * elapsed) / total;
        }
    }
Give an estimate on how much of the time tracked by this
instance was used fetching document contents. This will
by definition be smaller than last() - first().
container-search/src/main/java/com/yahoo/search/statistics/ElapsedTime.java