<commit_before>package systemTestingDSL

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.sys.process._
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.actors.threadpool.TimeoutException
import com.typesafe.config.ConfigFactory
import java.io.FileNotFoundException

trait Runnable {
  def commandName: String
  def fileName: String
  def arguments: String
  def outputFileName: String
  val separator: String = SPACE

  def execute: String = {
    val cmd = commandName.concat(separator).concat(arguments).concat(separator).concat(fileName)
    val timeout: Int = ConfigFactory.load().getInt("TIMEOUT")
    val executeFuture: Future[String] = Future {
      println(cmd)
      val result: String = cmd.!!
      result
    }
    try {
      Await.result(executeFuture, 300 seconds)
    } catch {
      case ex: TimeoutException => "The above computation timed out"
      case ex: FileNotFoundException => "The file could not be found, please check the executable paths"
    }
  }

}<commit_msg>Added total time per method invocation<commit_after>package systemTestingDSL

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.sys.process._
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.actors.threadpool.TimeoutException
import com.typesafe.config.ConfigFactory
import java.io.FileNotFoundException

trait Runnable {
  def commandName: String
  def fileName: String
  def arguments: String
  def outputFileName: String
  val separator: String = SPACE

  def executeFuture: String = {
    val cmd = commandName.concat(separator).concat(arguments).concat(separator).concat(fileName)
    val timeout: Int = ConfigFactory.load().getInt("TIMEOUT")

    val executeFuture: Future[String] = Future {
      println(cmd)
      val result: String = cmd.!!
      result
    }
    try {
      Await.result(executeFuture, timeout seconds)
    } catch {
      case ex: TimeoutException => "The above computation timed out"
      case ex: FileNotFoundException => "The file could not be found, please check the executable paths"
    }
  }

  def execute: String = {
    var endTime: Long = 0
    var startTime = System.currentTimeMillis
    val result = execute
    endTime = System.currentTimeMillis
    println("Total time taken + ", (endTime - startTime))
    result
  }

}
{'fraction_non_alphanumeric': 0.08419314898885678, 'fraction_numerical': 0.0016508460586050352, 'mean_word_length': 3.9068825910931175, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1879647', 'n_tokens_mistral': 679, 'n_tokens_neox': 663, 'n_words': 192}