-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bench: using benchmark storage, extracted project (#422)
Using special benchmark storage from artipie/asto for benchmarks. Moved benchmarks project to separate Maven project. Signed-off-by: Kirill Ch. <g4s8.public@gmail.com> Close: #421 Ref: artipie/asto#314
- Loading branch information
Showing
8 changed files
with
141 additions
and
117 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# RPM adapter benchmarks | ||
|
||
To run benchmarks: | ||
1. Install snapshot locally of `rpm-adapter`: `mvn install` | ||
2. Build `rpm-bench` project: `mvn package -f ./benchmarks` | ||
4. Create directory for tests and copy test resources to this directory | ||
5. Run benchmarks with `env BENCH_DIR=${test-dir} java -cp "benchmarks/target/benchmarks.jar" org.openjdk.jmh.Main ${bench-name}`, where `${test-dir}` is a directory with test data, and `${bench-name}` is a benchbmark name. | ||
|
||
## Benchmarks | ||
|
||
### RpmBench | ||
|
||
This benchmark class creates/updates repository indexes over provided RPM packages, it calls | ||
`com.artipie.rpm.Rpm.batchUpdateIncrementally` and requires the set of the RPMs in the test directory. | ||
There are available bundles: | ||
- https://artipie.s3.amazonaws.com/rpm-test/bundle100.tar.gz | ||
- https://artipie.s3.amazonaws.com/rpm-test/bundle1000.tar.gz | ||
|
||
### RpmMetadataRemoveBench | ||
|
||
This benchmark class removes RPM packages records from the repository index files, it works with | ||
`com.artipie.rpm.RpmMetadata.Remove` class and requires xml (unpacked) indexes in the test directory. | ||
Example repository index xmls can be found | ||
[here](https://artipie.s3.amazonaws.com/rpm-test/centos-7-os-x86_64-repodata.tar.gz). | ||
|
||
### RpmMetadataAppendBench | ||
|
||
`RpmMetadataAppendBench` updates repository metadata with the list of the provided `.rpm` packages, | ||
it works with `com.artipie.rpm.RpmMetadata.Append` class and requires xml (unpacked) indexes and | ||
`.rpm` packages to add in the test directory. Example data set for the benchmark can be found | ||
[here](https://artipie.s3.amazonaws.com/rpm-test/rpm-metadata-append-bench.tar.gz). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>com.artipie</groupId> | ||
<artifactId>ppom</artifactId> | ||
<version>0.5.1</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.artipie</groupId> | ||
<artifactId>rpm-bench</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<properties> | ||
<jmh.version>1.29</jmh.version> | ||
<asto.version>1.2.0</asto.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.artipie</groupId> | ||
<artifactId>rpm-adapter</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-core</artifactId> | ||
<version>${jmh.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-generator-annprocess</artifactId> | ||
<version>${jmh.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.artipie</groupId> | ||
<artifactId>asto</artifactId> | ||
<version>${asto.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>8</source> | ||
<target>8</target> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>org.openjdk.jmh</groupId> | ||
<artifactId>jmh-generator-annprocess</artifactId> | ||
<version>${jmh.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>benchmarks</finalName> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<mainClass>org.openjdk.jmh.Main</mainClass> | ||
</transformer> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> | ||
</transformers> | ||
<filters> | ||
<filter> | ||
<!-- | ||
Shading signed JARs will fail without this. | ||
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar | ||
--> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*.SF</exclude> | ||
<exclude>META-INF/*.DSA</exclude> | ||
<exclude>META-INF/*.RSA</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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