Skip to content

Instantly share code, notes, and snippets.

@bigtoast
Created May 8, 2013 17:51
Show Gist options
  • Save bigtoast/5542202 to your computer and use it in GitHub Desktop.
Save bigtoast/5542202 to your computer and use it in GitHub Desktop.
package com.ticketfly.pillage
import spock.lang.*
class PillagedReporterSpec extends Specification {
@Shared String addy
@Shared String name
@Shared PillagedReporter reporter
@Shared def port = 6666
def setupSpec() { // why the fuck is this so slow?
//addy = "239.2.11.71"
addy = "localhost"
name = InetAddress.getLocalHost().getHostName()
reporter = new PillagedReporter(addy, port )
}
def "Sending some stats"() {
when:
def stats = new StatsContainerImpl( new HistogramMetricFactory() )
stats.incr("counter1")
stats.add("mtest",666)
stats.set("key","value")
reporter.report(stats.getSummary())
then:
1 == 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment