This file contains 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
{"timestamp":1398344097050,"source":"main","totalCount":0,"totalSent":0} | |
{"timestamp":1398344097857,"source":"main","totalCount":5,"averageLatency":48,"percentile90th":126} | |
{"timestamp":1398344097878,"source":"main","totalCount":5,"averageTimeElapsed":53,"maxTimeElapsed":203,"minTimeElapsed":10,"percentile90th":134} | |
{"timestamp":1398344097896,"source":"main","totalCount":5,"averageResponseSize":0,"percentile90th":0,"minResponseSize":0,"maxResponseSize":0} | |
{"timestamp":1398344098050,"source":"main","totalCount":6,"totalSent":6} | |
{"timestamp":1398344099057,"source":"main","totalCount":6,"averageLatency":11,"percentile90th":12} | |
{"timestamp":1398344099078,"source":"main","totalCount":6,"averageTimeElapsed":14,"maxTimeElapsed":31,"minTimeElapsed":9,"percentile90th":21} | |
{"timestamp":1398344099089,"source":"main","totalCount":6,"averageResponseSize":0,"percentile90th":0,"minResponseSize":0,"maxResponseSize":0} | |
{"timestamp":1398344099050,"source":"main","totalCount":11,"totalSent":5} | |
{"timestamp":1398344100063,"source |
This file contains 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
{"pages":{"main":{"timestamp":1397482045548,"total_count":0,"total_sent":0}}} | |
{"pages":{"main":{"timestamp":1397482046356,"total_count":5,"total_latency":434}}} | |
{"pages":{"main":{"timestamp":1397482046376,"total_count":5,"total_time_elapsed":460,"max_response_time":382,"min_response_time":11}}} | |
{"pages":{"main":{"timestamp":1397482046390,"total_count":5,"total_response_size":0}}} | |
{"pages":{"main":{"timestamp":1397482046548,"total_count":6,"total_sent":6}}} | |
{"pages":{"main":{"timestamp":1397482047554,"total_count":6,"total_latency":62}}} | |
{"pages":{"main":{"timestamp":1397482047571,"total_count":6,"total_time_elapsed":78,"max_response_time":26,"min_response_time":9}}} | |
{"pages":{"main":{"timestamp":1397482047587,"total_count":6,"total_response_size":0}}} | |
{"pages":{"main":{"timestamp":1397482047548,"total_count":11,"total_sent":5}}} | |
{"pages":{"main":{"timestamp":1397482048559,"total_count":5,"total_latency":55}}} |
This file contains 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
// more config options at http://hc.apache.org/httpcomponents-asyncclient-4.0.x/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientConfiguration.java | |
public RequestRunner provideRequestRunner( ComponentContext context, URI pageUri, Iterable<URI> assetUris ) | |
throws IOException | |
{ | |
try | |
{ | |
IOReactorConfig ioReactorConfig = IOReactorConfig.custom() | |
.setIoThreadCount( Runtime.getRuntime().availableProcessors() ) | |
.setConnectTimeout( 30_000 ) |
This file contains 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.smartbear.saas.rs.storage; | |
import com.smartbear.saas.rs.model.TestRun; | |
import java.util.Optional; | |
import java.util.Set; | |
public interface TestRunStorage | |
{ | |
This file contains 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
#!/usr/bin/groovy | |
/** | |
* OSGi Runtime Analyser | |
* Scans a directory recursively for bundles, finding if all packages are | |
* used/provided by the bundles found. | |
*/ | |
import groovy.io.FileType | |
import groovy.transform.EqualsAndHashCode |
This file contains 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
// This is a comparison between Scala and Ceylon based on this previous comparison I made between Haskell and Groovy: | |
// https://gist.github.com/renatoathaydes/5078535 | |
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible | |
// combinations between numbers in those lists, here's what we'd do. | |
/* SCALA */ | |
for { x <- List(2,5,10); y <- List(8,10,11) } yield x*y |
This file contains 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
"A read-only property." | |
shared interface Property<out Prop> { | |
"Gets the value of this property." | |
shared formal Prop get; | |
"On change of the value of this property, the given function will be invoked." | |
shared formal void onChange(Anything(Prop) runOnChange); | |
} |
This file contains 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
shared void run() { | |
object mouseDownBus extends EventBus<MouseDown>() {} | |
object mouseUpBus extends EventBus<MouseUp>() {} | |
mouseDownBus.listen(void (MouseDown event) => print("1 - " + event.string)); | |
mouseDownBus.listen(void (MouseDown event) => print("2 - " + event.string)); | |
mouseUpBus.listen(void (MouseUp event) => print("3 - " + event.string)); | |
This file contains 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
import java.awt.* | |
def virtualBounds = new Rectangle() | |
GraphicsEnvironment ge = GraphicsEnvironment.localGraphicsEnvironment | |
GraphicsDevice[] gs = ge.screenDevices | |
println Arrays.toString(gs) | |
gs.each { GraphicsDevice gd -> | |
GraphicsConfiguration[] gc = gd.configurations |
This file contains 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.athaydes.automaton.internal; | |
import org.hamcrest.Description; | |
import org.hamcrest.Factory; | |
import org.hamcrest.Matcher; | |
import org.junit.internal.matchers.TypeSafeMatcher; | |
/** | |
* User: Renato | |
*/ |