Skip to content

Instantly share code, notes, and snippets.

View DaGeRe's full-sized avatar

DaGeRe DaGeRe

View GitHub Profile
@DaGeRe
DaGeRe / KiekerDemoCLT.md
Last active September 4, 2024 11:34
Description of a Kieker demo using the TeaStore for the Chemnitzer Linuxtage

This little tutorial defines how to reproduce the Kieker demo for the TeaStore that was presented for the Chemnitzer Linuxtage. It shows how the architecture can be restructed and how a regression can be spotted.

Prerequisites

Please make sure you install the following tools:

  • Make sure you got JDK 11 installed and $JAVA_HOME set correctly.
  • Make sure you got JMeter installed and $JMETER_HOME pointing to its folder.
  • Make sure you got Kieker (https://github.com/kieker-monitoring/kieker) downloaded (e.g. git clone https://github.com/kieker-monitoring/kieker.git) and built via ./gradlew assemble -x test -x check -x apidoc (we use the current 2.0.0-SNAPSHOT - please file an issue if you have a problem with this steps in a newer version). Set $KIEKER_HOME to the root folder of your built Kieker.
  • My fork of the TeaStore: https://github.com/DaGeRe/TeaStore (git clone https://github.com/DaGeRe/TeaStore.git)
  • GraphViz (For Ubuntu: sudo apt install graphviz)
  • docker (For Ubuntu: `sudo apt insta
@DaGeRe
DaGeRe / CheckerSolver.java
Last active February 26, 2023 18:20
Solves the checkers problem (how to place n queens in an n x n field), which requires backtracking (and is NP-complete)
package checkers;
import java.util.Stack;
class Solution {
final int row, col;
public Solution(int row, int col) {
this.row = row;
this.col = col;
@DaGeRe
DaGeRe / UncompilableComparable.java
Created June 10, 2021 11:00
Compiling class in Java 11, but not in Java 8
/**
* Compilation fails in Java 8 because "UncompilableComparable.java:[16,10] variable entry might not have been initialized", but works in Java 11
*/
public class UncompilableComparable implements Comparable<UncompilableComparable> {
private Comparator<UncompilableComparable> comparator = Comparator.comparingInt(entry -> System.identityHashCode(entry));
private final int typ;
public UncompilableComparable(final int typ) {
@DaGeRe
DaGeRe / gist:aac2953fad76f2a33589028321f5b9aa
Created March 28, 2021 20:33
Peass installation pipeline
pipeline {
agent any
stages {
stage('checkout') {
steps{
dir('kopeme') {
git branch: 'develop', url: 'https://github.com/DaGeRe/KoPeMe.git'
}
wget https://archive.apache.org/dist/tomcat/tomcat-6/v6.0.9/bin/apache-tomcat-6.0.9.tar.gz
wget https://www-eu.apache.org/dist/tomcat/tomcat-9/v9.0.16/bin/apache-tomcat-9.0.16.tar.gz
tar -xvf apache-tomcat-6.0.9.tar.gz
tar -xvf apache-tomcat-9.0.16.tar.gz
rm apache-tomcat-9.0.16/webapps/ROOT/* -rf
cp -r apache-tomcat-6.0.9/webapps/ROOT/* apache-tomcat-9.0.16/webapps/ROOT/
path=$(pwd)
for tomcat in "apache-tomcat-9.0.16" "apache-tomcat-6.0.9"