<commit_before>/*
 * Copyright (c) 2015. <NAME>, <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  		http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * QBit - The Microservice lib for Java : JSON, WebSocket, REST. Be The Web!
 */

package io.advantageous.qbit.metrics;

import io.advantageous.qbit.client.ClientProxy;
import io.advantageous.qbit.reactive.Callback;
import io.advantageous.qbit.service.stats.StatsCollector;

/**
 * StatService
 * created by rhightower on 1/28/15.
 */

public interface StatService extends ClientProxy, StatsCollector {
    default void recordCount(String name, int count) {
    }

    default void recordLevel(String name, int level) {
    }

    default void recordTiming(String name, int duration) {
    }


    default void statsForLastSeconds(Callback<Stats> callback, String name, int secondCount) {
    }

    default void averageLastLevel(Callback<Integer> callback, String name, int secondCount) {
    }

    default void currentMinuteCount(Callback<Integer> callback, String name) {
    }

    default void currentSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastSecondCount(Callback<Integer> callback, String name) {
    }


    default void lastTenSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastFiveSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastNSecondsCount(Callback<Integer> callback, String name, int secondCount) {
    }


    default void lastNSecondsCountExact(Callback<Integer> callback, String name, int secondCount) {
    }


    default void lastTenSecondCountExact(Callback<Integer> callback, String name) {
    }

    default void lastFiveSecondCountExact(Callback<Integer> callback, String name) {
    }


    default void recordWithTime(String name, int count, long timestamp) {
    }

    default void recordAll(long timestamp, String[] names, int[] counts) {
    }

    default void recordAllWithTimes(String[] names, int[] counts, long[] times) {
    }
}
<commit_msg>added increment method to async stats interface<commit_after>/*
 * Copyright (c) 2015. <NAME>, <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  		http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * QBit - The Microservice lib for Java : JSON, WebSocket, REST. Be The Web!
 */

package io.advantageous.qbit.metrics;

import io.advantageous.qbit.client.ClientProxy;
import io.advantageous.qbit.reactive.Callback;
import io.advantageous.qbit.service.stats.StatsCollector;

/**
 * StatService
 * created by rhightower on 1/28/15.
 */

public interface StatService extends ClientProxy, StatsCollector {
    default void recordCount(String name, int count) {
    }

    default void increment(String name) {
        recordCount(name, 1);
    }

    default void recordLevel(String name, int level) {
    }

    default void recordTiming(String name, int duration) {
    }

    default void statsForLastSeconds(Callback<Stats> callback, String name, int secondCount) {
    }

    default void averageLastLevel(Callback<Integer> callback, String name, int secondCount) {
    }

    default void currentMinuteCount(Callback<Integer> callback, String name) {
    }

    default void currentSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastSecondCount(Callback<Integer> callback, String name) {
    }


    default void lastTenSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastFiveSecondCount(Callback<Integer> callback, String name) {
    }

    default void lastNSecondsCount(Callback<Integer> callback, String name, int secondCount) {
    }

    default void lastNSecondsCountExact(Callback<Integer> callback, String name, int secondCount) {
    }

    default void lastTenSecondCountExact(Callback<Integer> callback, String name) {
    }

    default void lastFiveSecondCountExact(Callback<Integer> callback, String name) {
    }

    default void recordWithTime(String name, int count, long timestamp) {
    }

    default void recordAll(long timestamp, String[] names, int[] counts) {
    }

    default void recordAllWithTimes(String[] names, int[] counts, long[] times) {
    }
}

{'fraction_non_alphanumeric': 0.0864463133189908, 'fraction_numerical': 0.00528065714844514, 'mean_word_length': 3.8704761904761904, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2373515', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1366, 'n_words': 476}