-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d630813
commit e435a88
Showing
15 changed files
with
588 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.gradle | ||
**/build/ | ||
**/out/ |
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,48 @@ | ||
name: Integration smoke test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
integration-smoke-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
svc: | ||
- 'alpine-3.16-8' | ||
- 'alpine-3.16-11' | ||
- 'alpine-3.16-17' | ||
- 'alpine-3.17-8' | ||
- 'alpine-3.17-11' | ||
- 'alpine-3.17-17' | ||
- 'alpine-3.18-8' | ||
- 'alpine-3.18-11' | ||
- 'alpine-3.18-17' | ||
- 'alpine-3.19-8' | ||
- 'alpine-3.19-11' | ||
- 'alpine-3.19-17' | ||
- 'ubuntu-18.04-8' | ||
- 'ubuntu-18.04-11' | ||
- 'ubuntu-18.04-17' | ||
- 'ubuntu-20.04-8' | ||
- 'ubuntu-20.04-11' | ||
- 'ubuntu-20.04-17' | ||
- 'ubuntu-20.04-21' | ||
- 'ubuntu-22.04-8' | ||
- 'ubuntu-22.04-11' | ||
- 'ubuntu-22.04-17' | ||
- 'ubuntu-22.04-21' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.6 | ||
- run: make itest | ||
shell: bash | ||
env: | ||
ITEST_SERVICE: ${{ matrix.svc }} |
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,27 @@ | ||
ARG IMAGE_VERSION | ||
FROM alpine:${IMAGE_VERSION} | ||
ARG IMAGE_VERSION | ||
ARG JAVA_VERSION | ||
RUN apk add openjdk${JAVA_VERSION} | ||
WORKDIR /app | ||
ADD gradlew build.gradle settings.gradle /app/ | ||
ADD gradle gradle | ||
RUN ./gradlew --no-daemon --version | ||
ADD agent agent | ||
ADD async-profiler-context async-profiler-context | ||
ADD demo/build.gradle demo/ | ||
|
||
RUN ./gradlew --no-daemon shadowJar | ||
|
||
ADD demo demo | ||
|
||
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/default-jvm/jre/bin | ||
|
||
|
||
RUN javac demo/src/main/java/Fib.java | ||
|
||
ENV PYROSCOPE_LOG_LEVEL=debug | ||
ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040 | ||
ENV PYROSCOPE_APPLICATION_NAME=alpine-${IMAGE_VERSION}-${JAVA_VERSION} | ||
ENV PYROSCOPE_UPLOAD_INTERVAL=15s | ||
CMD ["java", "-javaagent:/app/agent/build/libs/pyroscope.jar", "-cp", "demo/src/main/java/", "Fib"] |
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
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
Binary file not shown.
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,50 @@ | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.concurrent.ExecutorService; | ||
import java.util.concurrent.Executors; | ||
|
||
public class Fib { | ||
public static final int N_THREADS; | ||
|
||
static { | ||
int n; | ||
try { | ||
n = Integer.parseInt(System.getenv("N_THREADS")); | ||
} catch (NumberFormatException e) { | ||
n = 1; | ||
} | ||
N_THREADS = n; | ||
} | ||
|
||
public static void main(String[] args) { | ||
appLogic(); | ||
} | ||
|
||
private static void appLogic() { | ||
ExecutorService executors = Executors.newFixedThreadPool(N_THREADS); | ||
for (int i = 0; i < N_THREADS; i++) { | ||
executors.submit(() -> { | ||
while (true) { | ||
try { | ||
fib(32L); | ||
} catch (InterruptedException e) { | ||
Thread.currentThread().interrupt(); | ||
break; | ||
} | ||
} | ||
}); | ||
} | ||
} | ||
|
||
private static long fib(Long n) throws InterruptedException { | ||
if (n == 0L) { | ||
return 0L; | ||
} | ||
if (n == 1L) { | ||
return 1L; | ||
} | ||
return fib(n - 1) + fib(n - 2); | ||
} | ||
|
||
} |
Oops, something went wrong.