Created
May 8, 2013 17:51
-
-
Save bigtoast/5542202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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