forked from vsonnier/hppcrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
69 lines (47 loc) · 2.98 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Hacking HPPC-RT:
----------------
The project as a whole requires Java 8, although the final runtime jar is still Java 5 compatible. To assure such
antiquated compatibility, some restrictions must be enforced:
* hppcrt (sources) : Runtime sources either templates or hand-coded can be up to Java 7 grammar, but have to use Java 5 API at best.
Then, the Retrolambda plugin translates Java <= 7 language constructs to 1.5 language ones, and finally
the strict 1.5 API compatibility is checked by the animal-sniffer plugin before building the runtime jar.
* hppcrt (tests): templates and hand-coded tests are allowed to be fully Java 8 compatible, APIs included.
* hppcrt-template-processor: allowed to be fully Java 8 compatible, APIs included.
* hppcrt-benchmarks: allowed to be fully Java 8 compatible, APIs included.
Maven shortcuts:
---------------
Note: While executing targets 'compile', 'test', 'package'
Maven console ouputs #parse ERRORs by the logger 'org.slf4j.simpleLogger.log.TemplateProcessor.directive.import'. Those errors denote normal operation.
# Clean everything
mvn clean
# Generate Eclipse project files (the setup is a bit complex, so use this!)
mvn clean compile eclipse:clean eclipse:eclipse
# Compile
mvn clean compile
# Compile all, run all unit tests
mvn clean test
# Build sources jar.
mvn source:jar
# Package all JAR files, builds the benchmarks jar, skip the tests execution.
mvn clean package -Pquick
# Compile all, run all unit tests, package all JAR files, builds the benchmarks jar, install packages in a local repository.
mvn clean install
# Compile all, package all JAR files, builds the benchmarks jar, skip the tests execution, install packages in a local repository.
mvn clean install -Pquick
# Try to resolve all dependencies to be able to work off the Net
mvn dependency:go-offline
# Use -Pquick to skip tests execution,
# and replace -Pquick by -Pquicknodoc to also skip Javadoc generation.
# Compile all, create benchmark JAR only
mvn clean package -Pquicknodoc -am -pl :hppcrt-benchmarks
# List available benchmarks
java -jar hppcrt-benchmarks/target/benchmarks.jar -l
# Run a particular benchmark:
java -cp hppcrt-benchmarks/target/benchmarks.jar com.carrotsearch.hppcrt.jmh.[benchmark class, see list above] --- --warmup=[nb of warmups] --measure=[nb of measures after warmups]
# Run a particular benchmark, with overriden @Param values. Add one of more arguments to the command line, such as:
param=value1,value2[...etc]
where param is one of @Param name, with value1,value2,... overriding the alternatives hardcoded in benchmark code.
That way, @Param numbers can be changed, truncated, added, without recompiling. @Param enum values cannot be changed,
but you can restrict the execution to a subset of the existing values, still without recompiling.
Ex:
java -cp hppcrt-benchmarks/target/benchmarks.jar com.carrotsearch.hppcrt.jmh.BenchmarkHashMapPut --- --warmup=10 --measure=10 loadFactor=0.5,0.8 targetSize=1000000,2000000 implementation=HPPCRT_INT_INT,HPPC_IDENTITY_INT