class SlideWindowDependency extends AbstractDependency {

    @Override
    public CheckResult call() throws Exception {
        final long start = System.currentTimeMillis();
        final double averageFailedRatio = eventList.addEvent(pingWrapper());
        final CheckStatus status;
        if (averageFailedRatio < maxOK) {
            status = CheckStatus.OK;
        } else if (averageFailedRatio < maxMinor) {
            status = CheckStatus.MINOR;
        } else if (averageFailedRatio < maxMajor) {
            status = CheckStatus.MAJOR;
        } else {
            status = CheckStatus.OUTAGE;
        }
        final long duration = System.currentTimeMillis() - start;
        final String errorMessage = formatErrorMessage(eventList.timeInterval, averageFailedRatio);
        return CheckResult.newBuilder(this, status, errorMessage)
                .setTimestamp(start)
                .setDuration(duration)
                .build();
    }

    protected  SlideWindowDependency(final String id,
                                    final String description,
                                    final long timeout,
                                    final long pingPeriod,
                                    final Urgency urgency,
                                    final double maxOK,
                                    final double maxMinor,
                                    final double maxMajor,
                                    final long timeInterval);

}