<commit_before>/*
 * Copyright (c) 2020. <NAME>
 */

package org.jacis.persistence.microstream.microstreamframework;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;

import org.jacis.testhelper.FileUtils;
import org.junit.AfterClass;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import one.microstream.jdk8.java.util.BinaryHandlersJDK8;
import one.microstream.storage.configuration.Configuration;
import one.microstream.storage.types.EmbeddedStorageFoundation;
import one.microstream.storage.types.EmbeddedStorageManager;

@Ignore
public class BasicMicrostreamPerfTest {

  private static final int MAX_TEST_SIZE = 500;
//  private static final int MAX_TEST_SIZE = Integer.MAX_VALUE;

  private static final Logger log = LoggerFactory.getLogger(BasicMicrostreamPerfTest.class);

  protected static Path getStorageDir(String suffix) {
    Path path = suffix == null ? Paths.get("var", BasicMicrostreamPerfTest.class.getName()) : Paths.get("var", BasicMicrostreamPerfTest.class.getName(), suffix);
    log.debug("use storage path: {}", path.toString());
    return path;
  }

  @AfterClass
  public static void cleanup() {
    FileUtils.deleteDirectory(Paths.get("var", BasicMicrostreamPerfTest.class.getName()).toFile());
  }

  protected EmbeddedStorageManager createStorageManager(Path storageDir) {
    EmbeddedStorageFoundation<?> foundation = Configuration.Default() //
        .setBaseDirectory(storageDir.toString()) //
        .setBackupDirectory(storageDir.toString() + "/backup") //<commit_msg>experiment<commit_after>/*
 * Copyright (c) 2020. <NAME>
 */

package org.jacis.persistence.microstream.microstreamframework;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;

import org.jacis.testhelper.FileUtils;
import org.junit.AfterClass;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import one.microstream.jdk8.java.util.BinaryHandlersJDK8;
import one.microstream.storage.configuration.Configuration;
import one.microstream.storage.types.EmbeddedStorageFoundation;
import one.microstream.storage.types.EmbeddedStorageManager;

public class BasicMicrostreamPerfTest {

  private static final int MAX_TEST_SIZE = 500;
//  private static final int MAX_TEST_SIZE = Integer.MAX_VALUE;

  private static final Logger log = LoggerFactory.getLogger(BasicMicrostreamPerfTest.class);

  protected static Path getStorageDir(String suffix) {
    Path path = suffix == null ? Paths.get("var", BasicMicrostreamPerfTest.class.getName()) : Paths.get("var", BasicMicrostreamPerfTest.class.getName(), suffix);
    log.debug("use storage path: {}", path.toString());
    return path;
  }

  @AfterClass
  public static void cleanup() {
    FileUtils.deleteDirectory(Paths.get("var", BasicMicrostreamPerfTest.class.getName()).toFile());
  }

  protected EmbeddedStorageManager createStorageManager(Path storageDir) {
    EmbeddedStorageFoundation<?> foundation = Configuration.Default() //
        .setBaseDirectory(storageDir.toString()) //
        .setBackupDirectory(storageDir.toString() + "/backup") //
{'fraction_non_alphanumeric': 0.11453870322764924, 'fraction_numerical': 0.006283918880319908, 'mean_word_length': 5.32129963898917, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1798955', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1024, 'n_words': 207}