<commit_before>//--------------------------------------
//
// LoadFileTest.scala
// Since: 2013/09/04 10:53 AM
//
//--------------------------------------

package xerial.silk.example

import xerial.silk.cluster.{Cluster3UserSpec, Cluster3Spec}
import java.io.{PrintWriter, BufferedWriter, FileWriter, File}

/**
 * @author <NAME>
 */
class LoadFileTestMultiJvm1 extends Cluster3Spec {
  "parse file" in {
    start { env =>

    }
  }
}


class LoadFileTestMultiJvm2 extends Cluster3Spec {
  "parse file" in {
    start { env =>

    }
  }
}

class LoadFileTestMultiJvm3 extends Cluster3UserSpec {
  "parse file" in {

    // Create a temporary file
    info("preparing sample file")
    val file = File.createTempFile("load-test", ".tab", new File("target"))
    file.deleteOnExit()
    val out = new PrintWriter(new BufferedWriter(new FileWriter(file)))
    val N = 1000000
    for(i <- (0 until N)) {
      val p = new Person(i, Person.randomName)
      out.println(p.toTSV)
    }
    out.close()
    info("done.")

    start { zkConnectString =>
      new ExampleMain(Some(zkConnectString)).loadFile(file.getPath)
    }
  }
}<commit_msg>Reduced LoadFileTest data size, since the large data size causes OutOfMemoryException<commit_after>//--------------------------------------
//
// LoadFileTest.scala
// Since: 2013/09/04 10:53 AM
//
//--------------------------------------

package xerial.silk.example

import xerial.silk.cluster.{Cluster3UserSpec, Cluster3Spec}
import java.io.{PrintWriter, BufferedWriter, FileWriter, File}

/**
 * @author <NAME>
 */
class LoadFileTestMultiJvm1 extends Cluster3Spec {
  "parse file" in {
    start { env =>

    }
  }
}


class LoadFileTestMultiJvm2 extends Cluster3Spec {
  "parse file" in {
    start { env =>

    }
  }
}

class LoadFileTestMultiJvm3 extends Cluster3UserSpec {
  "parse file" in {

    // Create a temporary file
    info("preparing sample file")
    val file = File.createTempFile("load-test", ".tab", new File("target"))
    file.deleteOnExit()
    val out = new PrintWriter(new BufferedWriter(new FileWriter(file)))
    val N = 100000
    for(i <- (0 until N)) {
      val p = new Person(i, Person.randomName)
      out.println(p.toTSV)
    }
    out.close()
    info("done.")

    start { zkConnectString =>
      new ExampleMain(Some(zkConnectString)).loadFile(file.getPath)
    }
  }
}
{'fraction_non_alphanumeric': 0.18386411889596602, 'fraction_numerical': 0.02335456475583864, 'mean_word_length': 2.4294032023289667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '830550', 'n_tokens_mistral': 793, 'n_tokens_neox': 736, 'n_words': 174}