Skip to content

Commit

Permalink
Add extra flags benchmark for petclinic latest
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Aug 2, 2018
1 parent fca1cfa commit e0755b1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ before Spring Boot actually starts).

### Spring Boot 2.x

Spring Boot is slower. Early milestones were fine, but degradation
continued through the 2.0 development cycle. A lot of progress was
made between M7 and RC1, so I suppose it could be worse. Results
(before RC2):
Spring Boot is 2.0 is a bit slower and 2.1 is a bit faster. Early
milestones were fine, but degradation continued through the 2.0
development cycle. A lot of progress was made between M7 and RC1, so I
suppose it could be worse. Results (before RC2):

```
Benchmark Mode Cnt Score Error Units
Expand Down
23 changes: 23 additions & 0 deletions benchmarks/src/main/java/com/example/PetclinicLatestBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public void explodedJarMain(MainState state) throws Exception {
state.run();
}

@Benchmark
public void explodedJarFlags(FlagsState state) throws Exception {
state.run();
}

@Benchmark
public void devtoolsRestart(ExplodedDevtoolsState state) throws Exception {
state.run();
Expand Down Expand Up @@ -109,6 +114,24 @@ public void stop() throws Exception {
}
}

@State(Scope.Benchmark)
public static class FlagsState extends ProcessLauncherState {
public FlagsState() {
super("target/demo", "-noverify", "-XX:TieredStopAtLevel=1",
"-Djava.security.egd=file:/dev/./urandom",
"-Dspring.config.location=classpath:/application.properties",
"-Dspring.jmx.enabled=false", "-cp", CLASSPATH,
"org.springframework.samples.petclinic.PetClinicApplication",
"--server.port=0");
unpack("target/demo", jarFile("com.example:petclinic-latest:jar:boot:1.4.2"));
}

@TearDown(Level.Iteration)
public void stop() throws Exception {
super.after();
}
}

@State(Scope.Benchmark)
public static class ExplodedDevtoolsState extends DevToolsLauncherState {

Expand Down

0 comments on commit e0755b1

Please sign in to comment.