<commit_before>package com.twitter.finagle.test

import java.util.concurrent.TimeUnit

import org.jboss.netty.handler.codec.http._

import net.lag.configgy.{Configgy, RuntimeEnvironment}
import com.twitter.ostrich
import com.twitter.finagle.client.{Client, Builder, Http, Ostrich}

import com.twitter.util.{Return, Throw}

object ClientTest extends ostrich.Service {
  def main(args: Array[String]) {
    val runtime = new RuntimeEnvironment(getClass)
    runtime.load(args)
    val config = Configgy.config
    ostrich.ServiceTracker.register(this)
    ostrich.ServiceTracker.startAdmin(config, runtime)

    val client =
      Builder()
        .hosts("localhost:10000,localhost:10001")
        .codec(Http)
        .connectionTimeout(100, TimeUnit.MILLISECONDS)
        .requestTimeout(1000, TimeUnit.MILLISECONDS)
        .reportTo(Ostrich(ostrich.Stats))
        .sampleWindow(20, TimeUnit.MINUTES)
        .sampleGranularity(30, TimeUnit.SECONDS)
        .buildClient[HttpRequest, HttpResponse]()

    for (_ <- 0 until 100)
      makeRequest(client)
  }

  def makeRequest(client: Client[HttpRequest, HttpResponse]) {
    client(new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/")) respond {
      case _ =>
        makeRequest(client)
    }
  }

  def quiesce() = ()
  def shutdown() = ()
}<commit_msg>use names in test client.<commit_after>package com.twitter.finagle.test

import java.util.concurrent.TimeUnit

import org.jboss.netty.handler.codec.http._

import net.lag.configgy.{Configgy, RuntimeEnvironment}
import com.twitter.ostrich
import com.twitter.finagle.client.{Client, Builder, Http, Ostrich}

import com.twitter.util.{Return, Throw}

object ClientTest extends ostrich.Service {
  def main(args: Array[String]) {
    val runtime = new RuntimeEnvironment(getClass)
    runtime.load(args)
    val config = Configgy.config
    ostrich.ServiceTracker.register(this)
    ostrich.ServiceTracker.startAdmin(config, runtime)

    val client =
      Builder()
        .name("http")
        .hosts("localhost:10000,localhost:10001")
        .codec(Http)
        .connectionTimeout(100, TimeUnit.MILLISECONDS)
        .requestTimeout(1000, TimeUnit.MILLISECONDS)
        .reportTo(Ostrich(ostrich.Stats))
        .sampleWindow(20, TimeUnit.MINUTES)
        .sampleGranularity(30, TimeUnit.SECONDS)
        .buildClient[HttpRequest, HttpResponse]()

    for (_ <- 0 until 100)
      makeRequest(client)
  }

  def makeRequest(client: Client[HttpRequest, HttpResponse]) {
    client(new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/")) respond {
      case _ =>
        makeRequest(client)
    }
  }

  def quiesce() = ()
  def shutdown() = ()
}
{'fraction_non_alphanumeric': 0.11558538404175989, 'fraction_numerical': 0.020134228187919462, 'mean_word_length': 3.562925170068027, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4436290', 'n_tokens_mistral': 890, 'n_tokens_neox': 832, 'n_words': 149}