Skip to content

Instantly share code, notes, and snippets.

View simonis's full-sized avatar

Volker Simonis simonis

View GitHub Profile
@simonis
simonis / GetLineNumber.java
Last active June 30, 2023 14:31
Get the source code line number in Java programmatically at runtime
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.stream.Stream;
public class GetLineNumber {
@simonis
simonis / G1_HeapAfterGCUsage_1g.svg
Last active October 31, 2023 15:25
Comparing JMX and hsperf metrics
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

void foo() {}
struct A {
A() {
foo();
}
};
struct B {
B() {