Skip to content

Instantly share code, notes, and snippets.

View SergejIsbrecht's full-sized avatar
💭
UTC+1

SergejIsbrecht

💭
UTC+1
View GitHub Profile
@SergejIsbrecht
SergejIsbrecht / flamegraph.svg
Created August 22, 2022 09:40
DispatcherBenchmark native-image
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SergejIsbrecht
SergejIsbrecht / io.sergejisbrecht.DispatcherBenchmark.baselineExecutorService-AverageTime-blackHoleCnt-1000-dispatcherCnt-20-jobCnt-10000.html
Last active August 22, 2022 09:11
# JMH version: 1.35 # VM version: JDK 11.0.16, OpenJDK 64-Bit Server VM, 11.0.16+7-jvmci-22.3-b03 # VM invoker: /graal/sdk/mxbuild/linux-amd64/GRAALVM_CE_JAVA11/graalvm-ce-java11-22.3.0-dev/bin/java # VM options: -XX:ThreadPriorityPolicy=1 -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCIProduct -XX:-UnlockExperimentalVMOptions -Dfile.encoding=U…
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<style>
body {margin: 0; padding: 10px; background-color: #ffffff}
h1 {margin: 5px 0 0 0; font-size: 18px; font-weight: normal; text-align: center}
header {margin: -24px 0 5px 0; line-height: 24px}
button {font: 12px sans-serif; cursor: pointer}
p {margin: 5px 0 5px 0}
@SergejIsbrecht
SergejIsbrecht / flame_perf_script_symfs.svg
Created September 30, 2021 19:18
Flamegraph created with inferno _with_ symfs (perf record -F99 --call-graph dwarf -- ./Rust_without_dbg ; perf script --symfs ~/Desktop/sysroot/ --kallsyms=/proc/kallsyms | /workspace/Github/inferno/target/release/inferno-collapse-perf > stacks.folded)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SergejIsbrecht
SergejIsbrecht / flame_perf_script.svg
Created September 30, 2021 19:17
Flamegraph created with inferno without symfs (perf record -F99 --call-graph dwarf -- ./Rust_without_dbg ; perf script | /workspace/Github/inferno/target/release/inferno-collapse-perf > stacks.folded)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SergejIsbrecht
SergejIsbrecht / SingleSchedulerWrapper.java
Created January 25, 2021 23:14
Wrap SingleScheduler
final class SingleSchedulerWrapper extends Scheduler {
private final Scheduler delegate;
SingleSchedulerWrapper(Scheduler delegate) {
this.delegate = Objects.requireNonNull(delegate, "delegate");
}
@Override
public long now(@NonNull TimeUnit unit) {
@SergejIsbrecht
SergejIsbrecht / scheduler.java
Created January 25, 2021 21:49
State of the RxJava Scheduler + Time
Scheduler {
Default:
Disposable scheduleDirect(@NonNull Runnable run)
Disposable scheduleDirect(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) // depends on Worker default-impl
Disposable schedulePeriodicallyDirect(@NonNull Runnable run, long initialDelay, long period, @NonNull TimeUnit unit) // uses now(TimeUnit) transitively from Worker default-impl
long now(@NonNull TimeUnit unit)
Abstract:
abstract Worker createWorker()
}
package io.reactivex.rxjava3.core;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.plugins.RxJavaPlugins;
import io.reactivex.rxjava3.schedulers.Schedulers;
import java.util.Objects;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@SergejIsbrecht
SergejIsbrecht / flame.svg
Created January 17, 2021 16:30
substrate_vm_flamegraph
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
WITHOUT DEBUG SYMBOLS DWARF
arguments(
'-H:+PreserveFramePointer',
'--no-server',
'--no-fallback',
'--enable-all-security-services',
'--report-unsupported-elements-at-runtime'
)
@SergejIsbrecht
SergejIsbrecht / timeout.kt
Last active January 11, 2021 12:08
timeout
@Test
fun fuck1() {
val dmb = io.reactivex.schedulers.Schedulers.single()
val watchDog = io.reactivex.schedulers.Schedulers.from(Executors.newSingleThreadExecutor())
watchDog.scheduleDirect {
println("watchDog scheduleDirect " + Thread.currentThread().name)
}