Benchmark framework (especially for ISUCONs), written in Java8
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/main/java/net/isucon/bench
.gitignore
LICENSE
README.md
build.gradle

README.md

ISUCON benchmark framework for Java8

TODO: write documents

How To Use

copy this script to your build.gradle to build/run benchmark scenario.

apply plugin: "java"
apply plugin: "application"
apply plugin: "maven"

repositories {
    mavenCentral()
}

dependencies {
    compile "net.isucon.bench:isucon-bench:0.1.1"
}

compileJava {
    gradle.projectsEvaluated {
        if (project.hasProperty('warn')) {
            options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
        }
    }
    options.encoding = 'UTF-8'
}

mainClassName = 'net.isucon.bench.Runner'

run {
    standardInput = System.in
    if (project.hasProperty('args')) {
        // gradle run -Pargs="net.isucon.your.isucon.RootScenario 127.0.0.1"
        args project.args.split('\\s+')
    } else {
        // echo '{}' | gradle run
        args "net.isucon.bench.example.ExampleScenario 127.0.0.1".split('\\s+')
    }
}

And develope your own Scenario and Parameter classes, then compile & run it.

$ gradle compileJava
$ echo '{}' | gradle run

How To Write Scenario

TBD

How To Release New Version To Maven Central

Configure your $HOME/.gradle/gradle.properties with GPG keyID, password & secretKeyRing file path, SonaType username/passwords:

signing.keyId=DEADBEEF
signing.password=my_long_secret
signing.secretKeyRingFile=/Users/tagomoris/.gnupg/secring.gpg
sonatypeUsername=tagomoris
sonatypePassword=mysecret

Then, build and upload artifact. Do clean just before uploadArchives, not to use cached .class files with new version number.

$ gradle clean && gradle uploadArchives

TODO

  • Write complete documents
  • Support non-keepalived connections
  • Support two or more HTTP endpoints
  • Support HTTP/2 requests
  • Support configurable timeouts per requests
  • Support counting requests/responses per URLs/Methods

LICENSE

MIT

AUTHOR

  • Satoshi Tagomori (tagomoris)