Gatling parameterize

In order to send testing parameters from command line like below mvn -ntp -f $retDir/gatling/pom.xml gatling:test -Dusers=2000 -Drepeat=3 these users and repeat can be used from load scala like below class LoadTest extends Simulation { val nbUsers = Integer.getInteger("users", 1000) val myRepeat = java.lang.Long.getLong("repeat", 2) val httpProtocol = http.baseUrl("http://localhost:8080") val scn = scenario("hello").repeat(myRepeat.toInt) { exec(http("GetApplicationInfo") .get("/hello") .check(status.is(200)) .check(jsonPath("$.name"))) } setUp( scn.inject( rampUsers(nbUsers) during (5 seconds) ).protocols(httpProtocol) ) } that test will send nbUsers of request to localhost:8080/hello myRepeat times, For full file check and how to call it from here

March 12, 2022 · 1 min · Özkan Pakdil

Get github action url from bash script

Getting the github action job url from bash I have been trying to link rest testing framework pages to the connect github action job BUILD_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" printf "[github action]($BUILD_URL) :point_left: \n" >> test-result.md here is the example result page check the footer area. like image below full bash script, in case you want to generate the url from yml ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} further details

March 11, 2022 · 1 min · Özkan Pakdil

Kubernetes Notes

Providers I have been studying kubernetes lately. I still wonder if will it be useful for personal usage for all peaople. Right now it is kind of expensive and used by big companies as customer to EKS(Amazon) or GKE(Google) or AKS(Azure/Microsoft), Another big player is Hetzner I have not heard before there is big blue also in this market IBM, I think they come in after they bought RedHat, because Redhat have openshift. Openshift is in-between product, Redhat provides it in cloud providers with managed option, check prices and there is “self managed” below table. ...

December 10, 2021 · 3 min · Özkan Pakdil

Building native image in windows with quarkus

“mvn package -Pnative” builds the native image from quarkus project. Important step is we have to run that mvn command from “native tools commnad” of visual studio. If you run the command from regular command prompt you get the error below [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] C:\Program Files\GraalVM\graalvm-ce-java17-21.3.0\bin\native-image.cmd -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=US -J-Dfile.encoding=UTF-8 -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace chinese-lang-1.0.0-SNAPSHOT-runner -jar chinese-lang-1.0.0-SNAPSHOT-runner.jar [chinese-lang-1.0.0-SNAPSHOT-runner:6432] classlist: 5,366.54 ms, 0.96 GB [chinese-lang-1.0.0-SNAPSHOT-runner:6432] setup: 943.11 ms, 0.96 GB Error: Default native-compiler executable 'cl.exe' not found via environment variable PATH Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain com.oracle.svm.core.util.UserError$UserException: Default native-compiler executable 'cl.exe' not found via environment variable PATH To prevent native-toolchain checking provide command-line option -H:-CheckToolchain at com.oracle.svm.core.util.UserError.abort(UserError.java:144) at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.addSkipCheckingInfo(CCompilerInvoker.java:104) at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.<init>(CCompilerInvoker.java:72) at com.oracle.svm.hosted.c.codegen.CCompilerInvoker$WindowsCCompilerInvoker.<init>(CCompilerInvoker.java:110) at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.create(CCompilerInvoker.java:84) at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:864) at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:527) at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:488) at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403) at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:569) at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:122) at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:599) [chinese-lang-1.0.0-SNAPSHOT-runner:6432] [total]: 6,384.40 ms, 0.96 GB # Printing build artifacts to: C:\Users\ozkan\projects\chinese-lang\target\chinese-lang-1.0.0-SNAPSHOT-native-image-source-jar\chinese-lang-1.0.0-SNAPSHOT-runner.build_artifacts.txt Error: Image build request failed with exit status 1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.552 s [INFO] Finished at: 2021-11-03T21:07:37Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.4.1.Final:build (default) on project chinese-lang: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:233) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568) [ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:821) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277) [ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478) [ERROR] at java.base/java.lang.Thread.run(Thread.java:833) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501) [ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1 [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:369) [ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:213) [ERROR] ... 11 more [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. If you run the command from native tools result is below ...

November 3, 2021 · 4 min · Özkan Pakdil

How to delete all files except one in bash

I have been testing jhipster and its jdl, nice thing you can prepare a jdl file and it will generate all dao and pojos and admin panels. jhipster is generating a lot of files and I wanted to delete them all except the jdl file itself, here is how ls -a | grep -v test.jdl | xargs rm -rf

October 10, 2021 · 1 min · Özkan Pakdil