<commit_before>package de.mxro.metrics.tests;

import de.mxro.async.properties.PropertyNode;
import de.mxro.async.properties.PropertyOperation;
import de.mxro.fn.Success;
import de.mxro.metrics.jre.Metrics;
import de.mxro.promise.Promise;
import de.oehme.xtend.junit.Hamcrest;
import de.oehme.xtend.junit.JUnit;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure0;
import org.hamcrest.CoreMatchers;
import org.hamcrest.Matcher;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.internal.ArrayComparisonFailure;
import org.junit.rules.ErrorCollector;

@JUnit
@Hamcrest
@SuppressWarnings("all")
public class TestCounter {
  @Test
  public void test() {
    PropertyNode m = Metrics.create();
    PropertyOperation<Long> _increment = Metrics.increment("de.mxro.counter");
    m.<Long>record(_increment);
    PropertyOperation<Long> _increment_1 = Metrics.increment("de.mxro.counter");
    m.<Long>record(_increment_1);
    PropertyOperation<Long> _decrement = Metrics.decrement("de.mxro.counter");
    m.<Long>record(_decrement);
    Promise<Object> _retrieve = m.retrieve("de.mxro.counter");
    Object _get = _retrieve.get();
    String _string = _get.toString();
    boolean _contains = _string.contains("1");
    TestCounter.<Boolean, Boolean>operator_doubleArrow(Boolean.valueOf(_contains), Boolean.valueOf(true));
    Promise<Success> _stop = m.stop();
    _stop.get();
  }
  
  private static void assertArrayEquals(final Object[] expecteds, final Object[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final byte[] expecteds, final byte[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final char[] expecteds, final char[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final short[] expecteds, final short[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final int[] expecteds, final int[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final long[] expecteds, final long[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  <commit_msg>Improving api Autocommit Thu Jan 15 10:35:01 EST 2015<commit_after>package de.mxro.metrics.tests;

import de.mxro.async.properties.PropertyNode;
import de.mxro.async.properties.PropertyOperation;
import de.mxro.metrics.MetricsCommon;
import de.mxro.promise.Promise;
import de.oehme.xtend.junit.Hamcrest;
import de.oehme.xtend.junit.JUnit;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure0;
import org.hamcrest.CoreMatchers;
import org.hamcrest.Matcher;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.internal.ArrayComparisonFailure;
import org.junit.rules.ErrorCollector;

@JUnit
@Hamcrest
@SuppressWarnings("all")
public class TestCounter {
  @Test
  public void test() {
    PropertyNode m = MetricsCommon.createUnsafe();
    PropertyOperation<Long> _value = MetricsCommon.value("de.mxro.hist", 1);
    m.<Long>record(_value);
    PropertyOperation<Long> _value_1 = MetricsCommon.value("de.mxro.hist", 2);
    m.<Long>record(_value_1);
    PropertyOperation<Long> _value_2 = MetricsCommon.value("de.mxro.hist", 3);
    m.<Long>record(_value_2);
    Promise<Object> _retrieve = m.retrieve("de.mxro.hist");
    Object _get = _retrieve.get();
    String _string = _get.toString();
    boolean _contains = _string.contains("2.0");
    TestCounter.<Boolean, Boolean>operator_doubleArrow(Boolean.valueOf(_contains), Boolean.valueOf(true));
  }
  
  private static void assertArrayEquals(final Object[] expecteds, final Object[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final byte[] expecteds, final byte[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final char[] expecteds, final char[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final short[] expecteds, final short[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final int[] expecteds, final int[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
  private static void assertArrayEquals(final long[] expecteds, final long[] actuals) {
    Assert.assertArrayEquals(expecteds, actuals);
  }
  
{'fraction_non_alphanumeric': 0.11878216123499143, 'fraction_numerical': 0.005574614065180103, 'mean_word_length': 5.106020942408377, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '671920', 'n_tokens_mistral': 1480, 'n_tokens_neox': 1465, 'n_words': 293}