Prometheus Kubernetes service and deployment Prometheus Grafana service and deployment
- already configured Prometheus datasource
- alredey configured Grafana exapmle dashboard
Links
Prometheus Kubernetes service and deployment Prometheus Grafana service and deployment
Links
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.quarkus:quarkus-resteasy:2.4.1.Final | |
//DEPS io.quarkus:quarkus-micrometer-registry-prometheus:2.4.1.Final | |
//JAVAC_OPTIONS -parameters | |
//JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager | |
import io.quarkus.runtime.Quarkus; | |
import javax.enterprise.context.ApplicationScoped; |
import http from 'k6/http'; | |
import { randomString } from 'https://jslib.k6.io/k6-utils/1.1.0/index.js'; | |
export const options = { | |
stages: [ | |
{ duration: '30s', target: 500 }, | |
{ duration: '2m', target: 1000 }, | |
{ duration: '30s', target: 0 } | |
] |
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//JAVA_OPTIONS -Xms32m -Xmx32m -Xlog:gc* -XX:+UseSerialGC | |
/// -XX:+HeapDumpBeforeFullGC | |
/// jbang run -D=WEAK WeakHashMapPoc.java for infinite execution as weak references are collected before an OOO | |
/// jbang run -D=STRONG -D=WEAK WeakHashMapPoc.java OOO even using a WeakHashMap, as keys are strongly referenced | |
/// jbang run WeakHashMapPoc.java for an OOO as simple Map keys are strongly referenced |
//usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS io.quarkus:quarkus-resteasy:2.5.1.Final | |
//DEPS io.quarkus:quarkus-resteasy-jackson:2.5.1.Final | |
//JAVAC_OPTIONS -parameters | |
//JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager | |
import io.quarkus.runtime.Quarkus; | |
import javax.enterprise.context.ApplicationScoped; |
jbang run https://gist.github.com/misTrasteos/e616b87452b215db116448216da59636\#file-stackorheapallocation-java
You will get a java.lang.OutOfMemoryError: Java heap space
. As we are using no-op Epsilon GC and we are allocation plenty of Integer objects in the heap.
jbang run -D=PRIMITIVE https://gist.github.com/misTrasteos/e616b87452b215db116448216da59636\#file-stackorheapallocation-java
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.apache.commons:commons-lang3:3.12.0 | |
//JAVA_OPTIONS -XX:-UseAdaptiveSizePolicy | |
//JAVA_OPTIONS -Xms16m -Xmx16m | |
//JAVA_OPTIONS -XX:NewSize=3m -XX:MaxNewSize=3m -XX:SurvivorRatio=1 | |
//JAVA_OPTIONS -XX:MaxTenuringThreshold=5 | |
//JAVA_OPTIONS -Xlog:gc* | |
//JAVA_OPTIONS -XX:+UseSerialGC |
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.openjdk.jol:jol-core:0.16 | |
import org.openjdk.jol.info.ClassLayout; | |
import org.openjdk.jol.info.GraphLayout; | |
public class JolTest { | |
static class Patient1{ |
jbang run --java-options="-XX:-UseStringDeduplication" https://gist.github.com/misTrasteos/225ca2f29996a20f88c8ddf0be3cd3b2#file-stringdeduplicationexample-java
Same number of String
and char[]
objects
jbang run --java-options="-XX:+UseStringDeduplication" https://gist.github.com/misTrasteos/225ca2f29996a20f88c8ddf0be3cd3b2#file-stringdeduplicationexample-java
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS org.apache.commons:commons-lang3:3.12.0 | |
//JAVA_OPTIONS -Xms128m -Xmx128m | |
//JAVA_OPTIONS -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC | |
//JAVA_OPTIONS -XX:+HeapDumpOnOutOfMemoryError | |
import org.apache.commons.lang3.RandomStringUtils; |