A tool to ease your work as a developer, not only regarding performance.
It generates functional non-regression tests to help you to work on legacy applications, diagnoses performance, and generates non-regression tests on performance-related properties.
📺 QuickPerf live demo (in French)
QuickPerf live works today for web applications developed with Spring Boot 2.
⚠ We do not recommend enabling the tool in a production environment today.
Examples:
- Detect long database queries
- Detect high heap allocation
- Detect n+1 select
- Detect a synchronous HTTP call while the application maintains the database connection
- ...
💡 You can use this feature during development or for a performance diagnostic audit of the application.
Today, for GET HTTP calls done with a Spring RestTemplate, the project allows generating JUnit 4 and JUnit 5 tests:
-
Reproducing N+1 select with a non-regression on N+1 select thanks to the QuickPerf testing library.
-
Ensuring a non-regression on the functional behavior. It works for both HTML or JSON response. The project uses the JSONassert library to compare the current JSON response with the expected one.
The generated tests execute a SQL file produced with the help of Quick SQL test data library.
<dependency>
<groupId>org.quickperf</groupId>
<artifactId>quick-perf-live-springboot2</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
Maven central contains a snapshot version. To use it, your projects need to access to Maven central snapshots:
<repositories>
<repository>
<id>maven-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<layout>default</layout>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
You can also build the library:
git clone https://github.com/quick-perf/quickperf-live.git
mvn clean install
From a yaml file:
quickperf:
enabled: true
From a .properties file:
quickperf.enabled=true
To have the results on application logs:
logging.level.org.quickperf.*=INFO
You also have the possibility to implement custom exports.
To do this, create Spring beans implementing QuickPerfHttpCallInfoWriter
and QuickPerfHttpCallWarningWriter
interfaces.
The configuration can be done from properties.
💡 Test generation tip If you use the library in your local environment, configure the generation in src/test/java
and src/test/resources
. So that, you can execute the generated tests in your IDE just after the generation!
quickperf:
test-generation:
java-folder-path: ".\\src\\test\\java"
resource-folder-path: ".\\src\\test\\resources"
The configuration can be updated after the application startup with MBeans:
💡 QuickPerf MBeans are unavailable? Read this.