<commit_before>package perftest

import perftest.client.Client
import perftest.server.Server

import java.net.URL

object Perftest {
  private def usage = println("Usage: Perftest [client|server] URL")
  private def parse(args: Array[String]) = if (args.length > 1) Some(args(0), new URL(args(1))) else None
  def main(args: Array[String]) = parse(args) match {
    case Some(("server", url)) => Server.run(url)
    case Some(("client", url)) => Client.run(Array(url.toString))
    case None                  => usage
  }
}
<commit_msg>perftest: Remove duplication of new URL(...) by parsing the 2nd arg as an URL<commit_after>package perftest

import perftest.client.Client
import perftest.server.Server

import java.net.URL

object Perftest {
  private def usage = println("Usage: Perftest [client|server] URL")
  private def parse(args: Array[String]) = if (args.length > 1) Some(args(0), new URL(args(1))) else None
  def main(args: Array[String]) = parse(args) match {
    case Some(("server", url)) => Server.run(url)
    case Some(("client", url)) => Client.run(url)
    case None                  => usage
  }
}

{'fraction_non_alphanumeric': 0.1419642857142857, 'fraction_numerical': 0.00625, 'mean_word_length': 3.9166666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6606057', 'n_tokens_mistral': 367, 'n_tokens_neox': 359, 'n_words': 103}