Skip to content

Commit

Permalink
Skeleton for overhead testing subproject. (#3554)
Browse files Browse the repository at this point in the history
* Skeleton for overhead testing subproject.

* clone into base image instead of submodule

* remove submodules file (even though it was empty)

* use multi-stage dockerfile to simplify image

* strip ssh and add CMD

* use the JRE base for the final stage
  • Loading branch information
breedx-splk authored Jul 20, 2021
1 parent e2d23cd commit ec30d42
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing-overhead/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.hprof
*.jfr
*.class
logs/
.idea/
19 changes: 19 additions & 0 deletions testing-overhead/Dockerfile-petclinic-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM adoptopenjdk:11-jdk as app-build

# This is the base image that will contain a built version of the spring-petclinic-rest
# application. Installing the dependencies and maven compiling the application is time
# consuming, so we do it in a base image to save time nightly.

RUN apt update && apt install -y git
WORKDIR /app
RUN git clone http://github.com/spring-petclinic/spring-petclinic-rest.git
WORKDIR /app/spring-petclinic-rest
RUN ./mvnw package -Dmaven.test.skip=true
RUN cp target/spring-petclinic-rest*.jar /app/spring-petclinic-rest.jar

FROM adoptopenjdk:11-jre

COPY --from=app-build /app/spring-petclinic-rest.jar /app/spring-petclinic-rest.jar
WORKDIR /app
EXPOSE 9966
CMD ["java", "-jar", "spring-petclinic-rest.jar"]
27 changes: 27 additions & 0 deletions testing-overhead/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# Overhead tests

This is a work in progress.

This directory will contain tools and utilities
that help us to measure the performance overhead introduced by
the agent and to measure how this overhead changes over time.

## Contents

tbd

## Config

tbd

## Setup and Usage

Once we have an established base image published for `spring-petclinic-rest`, this step
can be avoided by most users. For now, there is just a spring petclinic base image.

```
$ docker build -f Dockerfile-petclinic-base .
```

Remaining usage TBD.

0 comments on commit ec30d42

Please sign in to comment.