Skip to content

Instantly share code, notes, and snippets.

View itudoben's full-sized avatar
🏄

Johnny Hujol itudoben

🏄
View GitHub Profile
#!/usr/bin/env bash
BASEDIR=$(cd `dirname $0`/../ && pwd)
create_semaphore() {
# Number of concurrent jobs
NUM_CONCURRENT_JOBS=5
# Semaphore file
SEMAPHORE=/tmp/semaphore
@itudoben
itudoben / BenchmarkContext.groovy
Created December 11, 2023 18:07
new get gradle propertie
/*
* Copyright (c) 2017-2020, Sindice Limited. All Rights Reserved.
*
* This file is part of the Siren Federate Plugin project.
*
* The Siren Federate Plugin project is not open-source software. It is owned by Sindice Limited. The Siren Federate
* Plugin project can not be copied and/or distributed without the express permission of Sindice Limited. Any form of
* modification or reverse-engineering of the Siren Federate Plugin project is forbidden.
*/
package io.siren.federate.benchmark
@itudoben
itudoben / deployment-benchmark.yaml
Created December 19, 2022 06:18
gke client-2.0
apiVersion: batch/v1
kind: Job
metadata:
name: benchmark-0
labels:
app: benchmark
role: main
tier: backend
mode: base
namespace: {{.Env.NAMESPACE}}
@itudoben
itudoben / deployment-telegraf.yaml
Created December 19, 2022 06:18
gke client-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: telegraf-deployment
namespace: {{.Env.NAMESPACE}}
spec:
replicas: 1
minReadySeconds: 10
selector:
matchLabels:
@itudoben
itudoben / gke-node-pools.sh
Created December 19, 2022 06:18
gke client-2.0
#!/usr/bin/env bash
# Allow pipeline errors to bubble up.
set -o pipefail
# Set the working directories.
declare -r base_dir=$(dirname $0)
pushd "$base_dir/../../.." &>/dev/null
declare -r project_dir="$(pwd)"
@itudoben
itudoben / sysmon.sh
Created December 16, 2022 09:28
sysmon monitor benchmark container
#! /bin/bash
# This script is from https://linuxhint.com/check_memory_usage_process_linux/
# It can be used in the JMeter container of a Kubernetes cluster to list processes sorted by memory usage.
# An Example of the output:
#
# root@benchmark-0-bt75f:~# ./sysmon
# OWNER PID %CPU %MEM VMEM MB COMMAND
# root 512 7.4 4.2 9988.09 /opt/java/openjdk/bin/java
# root 650 1.4 1.6 4024.94 /opt/java/openjdk/bin/java
package io.siren.federate.integrationtests.testframework
import org.junit.Assert
import spock.lang.Specification
import java.lang.reflect.Field
import static java.lang.System.getenv
final class TestConfigurationTest extends Specification {
@itudoben
itudoben / main.php
Created January 15, 2014 13:50
Way to set up the Yii framework using environment variable in the <yii project>/protected/config/main.php
<?php
// The path where to put all the logs for the API.
// For instance on OSX environment this would be setup as: export YII_PATH_LOG=/var/log
$yii_path_log = getenv('YII_PATH_LOG');
if(!$yii_path_log) {
echo 'No YII_PATH_LOG set in user environment.';
exit;