<commit_before>package org.stagemonitor.alerting.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.stagemonitor.alerting.check.CheckResult;
import org.stagemonitor.alerting.check.Threshold;

/**
 * This annotation lets you define service level agreements within the code.
 * <p/>
 * It automatically creates checks for the annotated method.
 * The method also has to be annotated with @{@link org.stagemonitor.requestmonitor.MonitorRequests}
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Repeatable(SLAs.class)
public @interface SLA {

	/**
	 * If set, a check for the error rate will be created
	 */
	double errorRateThreshold() default -1;

	/**
	 * The metrics a threshold should be created for
	 * <p/>
	 * Make sure the number of metrics and thresholds match
	 */
	Metric[] metric() default {};

	/**
	 * The thresholds for the metrics
	 * <p/>
	 * Make sure the number of metrics and thresholds match
	 */
	double[] threshold() default {};

	CheckResult.Status severity() default CheckResult.Status.ERROR;

	/**
	 * Trigger alert when <code>actualValue OPERATOR threshold</code>
	 */
	Threshold.Operator operator() default Threshold.Operator.GREATER_EQUAL;
<commit_msg>Improved docs<commit_after>package org.stagemonitor.alerting.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.stagemonitor.alerting.check.CheckResult;
import org.stagemonitor.alerting.check.Threshold;

/**
 * This annotation lets you define service level agreements within the code.
 * <p/>
 * It automatically creates checks for the annotated method.
 * The method also has to be annotated with @{@link org.stagemonitor.requestmonitor.MonitorRequests}
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Repeatable(SLAs.class)
public @interface SLA {

	/**
	 * If set, a check for the error rate (errors/second) will be created
	 */
	double errorRateThreshold() default -1;

	/**
	 * The metrics a threshold should be created for
	 * <p/>
	 * Make sure the number of metrics and thresholds match
	 */
	Metric[] metric() default {};

	/**
	 * The thresholds for the metrics
	 * <p/>
	 * Make sure the number of metrics and thresholds match.
	 * Rates are per second and durations are in milliseconds.
	 */
	double[] threshold() default {};

	CheckResult.Status severity() default CheckResult.Status.ERROR;

	/**
	 * Trigger alert when <code>actualValue OPERATOR threshold</code>
	 */
	Threshold.Operator operator() default Threshold.Operator.GREATER_EQUAL;

{'fraction_non_alphanumeric': 0.10265486725663717, 'fraction_numerical': 0.0007079646017699115, 'mean_word_length': 4.541176470588235, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5031505', 'n_tokens_mistral': 841, 'n_tokens_neox': 774, 'n_words': 251}