Skip to content

Instantly share code, notes, and snippets.

View wfouche's full-sized avatar

Werner Fouché wfouche

View GitHub Profile
@wfouche
wfouche / APIUser.groovy
Created February 12, 2026 21:14
APIUser.groovy
//GROOVY 5.0.4
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import io.github.wfouche.tulip.user.HttpUser
class APIUser extends HttpUser {
// Action 1: GET /posts
boolean action1() {
@wfouche
wfouche / APIUser.kt
Created February 12, 2026 20:17
APIUser.kt
//KOTLIN 2.2.21
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import io.github.wfouche.tulip.user.HttpUser
class APIUser : HttpUser() {
// Action 1: GET /posts
override fun action1(): Boolean {
val response = httpGet("/posts")
@wfouche
wfouche / benchmark_report.json
Created February 9, 2026 11:19
Tulip JSON Summary Results
{
"config": {"actions": {"description": "jsonplaceholder.typicode.com", "output_filename": "benchmark_output.json", "report_filename": "benchmark_report.html", "user_class": "APIUser", "user_params": {"url": "http://jsonplaceholder.typicode.com", "httpVersion": "HTTP_1_1", "connectTimeoutMillis": 5000, "readTimeoutMillis": 10000, "debug": false}, "user_actions": {"1": "GET:Get all posts", "2": "POST:Create post", "3": "GET:Get single post"}}, "contexts": {"Context-1": {"enabled": true, "num_users": 80, "num_tasks": 10}}, "benchmarks": {"REST1": {"time": {"warmup_duration1": 30, "warmup_duration2": 10, "benchmark_duration": 30, "benchmark_iterations": 3}, "aps_rate": 40.0, "scenario_actions": [{"id": 1, "weight": 3}, {"id": 2, "weight": 1}, {"id": 3, "weight": 2}]}}},
"benchmarks": {
"REST1": {
"context": {"num_users": 80, "name": "Context-1", "num_threads": 80}, "results": {
"1": {"max_rtt": "2026-02-09T13:16:28", "AQS": 1.0041666666666667, "avg_aps": 40.0, "CPU_T": "0:00:03.0", "C
@wfouche
wfouche / gen_report.sh
Last active February 9, 2026 17:40
gen_report.sh
jbang run io.github.wfouche.tulip:tulip-runtime:2.2.3 --report benchmark_output.json
@wfouche
wfouche / run_bench.sh
Last active February 10, 2026 07:47
Tulip on Linux or MacOS
jbang run \
--java 21 \
--runtime-option -Xmx512m \
--runtime-option -XX:+UseZGC \
--deps io.github.wfouche.tulip:tulip-runtime:2.2.3 \
-m io.github.wfouche.tulip.api.TulipApi \
APIUser.java \
--config benchmark_config.json
@wfouche
wfouche / run_bench.cmd
Last active February 10, 2026 07:49
Tulip on Windows
jbang run ^
--java 21 ^
--runtime-option -Xmx512m ^
--runtime-option -XX:+UseZGC ^
--deps io.github.wfouche.tulip:tulip-runtime:2.2.3 ^
-m io.github.wfouche.tulip.api.TulipApi ^
APIUser.java ^
--config benchmark_config.json
@wfouche
wfouche / APIUser.java
Last active February 10, 2026 07:46
Tulip User
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.github.wfouche.tulip.user.HttpUser;
public class APIUser extends HttpUser {
// Action 1: GET /posts
public boolean action1() {
var response = httpGet("/posts");
return response.isSuccessful();
@wfouche
wfouche / benchmark_config.json
Last active February 9, 2026 17:55
Tulip Config
{
"actions": {
"description": "jsonplaceholder.typicode.com",
"output_filename": "benchmark_output.json",
"report_filename": "benchmark_report.html",
"user_class": "APIUser",
"user_params": {
"url": "http://jsonplaceholder.typicode.com",
"httpVersion": "HTTP_1_1",
"connectTimeoutMillis": 5000,
@wfouche
wfouche / CamelJBang.java
Last active January 9, 2026 21:37
CamelJBang.java
//JAVA 17+
//REPOS central=https://repo1.maven.org/maven2,apache-snapshot=https://repository.apache.org/content/groups/snapshots/
//DEPS org.apache.camel:camel-bom:${jbang.app.version:4.16.0}@pom
//DEPS org.apache.camel:camel-jbang-core:${jbang.app.version:4.16.0}
//DEPS org.apache.camel.kamelets:camel-kamelets:${jbang.app.version:4.16.0}
package main;
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
@wfouche
wfouche / asciidoctorj.java
Created July 7, 2025 22:08
JBang - asciidoctorj.java
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS org.asciidoctor:asciidoctorj:3.0.0
//DEPS org.asciidoctor:asciidoctorj-api:3.0.0
//DEPS org.asciidoctor:asciidoctorj-cli:3.0.0
//DEPS org.asciidoctor:asciidoctorj-epub3:2.1.3
//DEPS org.asciidoctor:asciidoctorj-diagram:3.0.1
//DEPS org.asciidoctor:asciidoctorj-diagram-batik:1.17
//DEPS org.asciidoctor:asciidoctorj-diagram-ditaamini:1.0.3
//DEPS org.asciidoctor:asciidoctorj-diagram-plantuml:1.2025.3