File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
src/main/java/org/redkalex/benchmark Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change 1
- FROM ubuntu:20.10
2
- ARG DEBIAN_FRONTEND=noninteractive
3
- ARG MAVEN_VERSION=3.8.1
4
-
1
+ FROM maven:3.8.1-openjdk-17-slim as maven
5
2
WORKDIR /redkale
6
- RUN apt-get update -yqq
7
- RUN apt-get install -yqq wget
8
-
9
- RUN wget --no-verbose https://redkale.org/graalvm-ee-java16-linux-amd64-21.2.0.tar.gz
10
- RUN tar -xzf graalvm-ee-java16-linux-amd64-21.2.0.tar.gz
11
- ENV JAVA_HOME /redkale/graalvm-ee-java16-21.2.0
12
-
13
- RUN wget --no-verbose https://ftp.wayne.edu/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz
14
- RUN tar -xzf apache-maven-${MAVEN_VERSION}-bin.tar.gz
15
- ENV MAVEN_HOME /redkale/apache-maven-${MAVEN_VERSION}
16
-
17
- ENV PATH $JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
18
-
19
3
COPY src src
20
4
COPY conf conf
21
5
COPY pom.xml pom.xml
22
6
RUN mvn package -q
23
7
24
- RUN cp /redkale/target/redkale-benchmark-1.0.0.jar redkale-benchmark.jar
8
+ FROM ghcr.io/graalvm/graalvm-ce:21.2.0
9
+ WORKDIR /redkale
10
+ COPY conf conf
11
+ COPY --from=maven /redkale/target/redkale-benchmark-1.0.0.jar redkale-benchmark.jar
25
12
26
13
EXPOSE 8080
27
14
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ public class Service extends AbstractService {
23
23
24
24
private static final byte [] helloBytes = "Hello, world!" .getBytes ();
25
25
26
+ private static final boolean cached = Boolean .getBoolean ("benchmarks.cache" );
27
+
26
28
private final ThreadLocal <RedRandom > rands = ThreadLocal .withInitial (() -> new RedRandom ());
27
29
28
30
@ Resource
You can’t perform that action at this time.
0 commit comments