Skip to content

Commit

Permalink
NH-37575: move benchmarking to Push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Jul 1, 2024
1 parent f737923 commit b132422
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
docker buildx build --tag $IMAGE_ID_XK6 --push xk6/
- name: Docker logout
if: always()
run: docker logout

test:
Expand Down Expand Up @@ -190,6 +191,7 @@ jobs:
name: lambda-release-test

- name: Docker logout
if: always()
run: docker logout

lambda-publish-stage:
Expand Down Expand Up @@ -380,6 +382,7 @@ jobs:
name: release-test

- name: Docker logout
if: always()
run: docker logout

benchmark:
Expand All @@ -398,9 +401,6 @@ jobs:
- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Benchmark test
working-directory: benchmark
run: ./gradlew test
Expand All @@ -417,4 +417,5 @@ jobs:
name: benchmark-test

- name: Docker logout
if: always()
run: docker logout
25 changes: 14 additions & 11 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
plugins {
id("java")
id("com.diffplug.spotless") version "6.1.2"
id("com.diffplug.spotless") version "6.25.0"
}

spotless {
java {
googleJavaFormat()
licenseHeaderFile(rootProject.file("../buildscripts/spotless.license.java"), "(package|import|public)")
// licenseHeaderFile(rootProject.file("../buildscripts/spotless.license.java"), "(package|import|public)")
target("src/**/*.java")
}
}
Expand All @@ -16,15 +16,18 @@ repositories {
}

dependencies {
testImplementation("org.testcontainers:testcontainers:1.16.2")
testImplementation("org.testcontainers:postgresql:1.15.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
testImplementation("org.junit.jupiter:junit-jupiter-params:5.7.2")
testImplementation("com.squareup.okhttp3:okhttp:4.9.1")
testImplementation("org.jooq:joox:1.6.2")
testImplementation("com.jayway.jsonpath:json-path:2.6.0")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.0.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
implementation(enforcedPlatform("org.junit:junit-bom:5.10.3"))

testImplementation("org.testcontainers:testcontainers:1.19.8")
testImplementation("org.testcontainers:postgresql:1.19.8")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testImplementation("com.squareup.okhttp3:okhttp:4.12.0")
testImplementation("org.jooq:joox:2.0.1")
testImplementation("com.jayway.jsonpath:json-path:2.9.0")
testImplementation("org.slf4j:slf4j-simple:2.0.13")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}

tasks {
Expand Down
2 changes: 2 additions & 0 deletions benchmark/src/test/java/io/opentelemetry/OverheadTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ public class OverheadTests {
static void setUp() {
collector = CollectorContainer.build(NETWORK);
collector.start();

aoCollector = AOTestCollectorContainer.build(NETWORK);
aoCollector.start();
}

@AfterAll
static void tearDown() {
collector.close();
aoCollector.close();
}

@TestFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import io.opentelemetry.agents.AgentResolver;
import io.opentelemetry.agents.LatestSolarwindsAgentResolver;
import io.opentelemetry.util.NamingConventions;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -99,6 +96,7 @@ private String[] buildCommandline(Optional<Path> agentJar) {
"-Dotel.traces.exporter=otlp",
"-Dotel.imr.export.interval=5000",
"-Dotel.exporter.otlp.insecure=true",
"-Dotel.exporter.otlp.protocol=grpc",
"-Dotel.exporter.otlp.endpoint=http://collector:4317",
"-Dotel.resource.attributes=service.name=petclinic-otel-overhead"));
} else {
Expand Down

0 comments on commit b132422

Please sign in to comment.