Skip to content

Instantly share code, notes, and snippets.

View zamazan4ik's full-sized avatar
🐰
Let's dig into loosely-coupled event-driven systems

Alexander Zaitsev zamazan4ik

🐰
Let's dig into loosely-coupled event-driven systems
View GitHub Profile
@zamazan4ik
zamazan4ik / constexprcheck.cpp
Created May 18, 2018 23:45
Constexpr check
//===--- ConstexprFunctionCheck.cpp - clang-tidy---------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "ConstexprFunctionCheck.h"
@zamazan4ik
zamazan4ik / convert_openvpn_conf_file_to_ovpn_file.py
Created February 22, 2022 18:22 — forked from ofirule/convert_openvpn_conf_file_to_ovpn_file.py
converting openvpn .conf file to .ovpn file
import sys, os
ALLOW_FILE_OPTIONS = ["ca", "cert", "dh", "extra-certs", "key", "pkcs12", "secret", "crl-verify", "http-proxy-user-pass", "tls-auth", "tls-crypt"]
filepath = sys.argv[1]
output_file = os.path.basename(filepath). replace(".conf", ".ovpn")
inline_tuples_to_add = []
@zamazan4ik
zamazan4ik / gist:bbffbdf9b10e2a281f5d5373347f48ef
Created March 19, 2023 18:42
Bevy bench results: Release run after PGO
cargo bench
Finished bench [optimized] target(s) in 0.18s
Running benches/bevy_math/bezier.rs (target/release/deps/bezier-17cb82cb782e4598)
Gnuplot not found, using plotters backend
easing_1000 time: [10.461 µs 10.470 µs 10.479 µs]
change: [-2.3215% -2.0838% -1.8365%] (p = 0.00 < 0.05)
Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) high mild
4 (4.00%) high severe
@zamazan4ik
zamazan4ik / gist:5d4da0f5c2003b416fc5538d01c61760
Created September 21, 2023 16:35
HAProxy GCC Instrumented new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 30 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:29:12.250155][2486679][I] Detected 9 (v)CPUs with affinity..
[18:29:12.250204][2486679][I] Starting 9 threads / event loops. Time limit: 30 seconds.
[18:29:12.250208][2486679][I] Global targets: 450 connections and 270000 calls per second.
[18:29:12.250210][2486679][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:29:43.202735][2486686][I] Stopping after 30000 ms. Initiated: 180772 / Completed: 180739. (Completion rate was 6024.632530048996 per second.)
[18:29:43.202751][2486693][I] Stopping after 30000 ms. Initiated: 181538 / Completed: 181505. (Completion rate was 6050.16606165006 per second.)
[18:29:43.202752][2486685][I] Stopping after 30000 ms. Initiated: 181928 / Completed: 181895. (Completion rate was 6063.16262455825 per second.)
[18:29:43.202772][2486695][I] Stopping after 30000 ms. Initiated: 182866 / Completed: 182833. (C
@zamazan4ik
zamazan4ik / gist:50c0bbd240745057dcc95f763d8c00be
Created September 21, 2023 16:35
HAProxy GCC Release new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 30 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:32:17.177721][2489483][I] Detected 9 (v)CPUs with affinity..
[18:32:17.177807][2489483][I] Starting 9 threads / event loops. Time limit: 30 seconds.
[18:32:17.177810][2489483][I] Global targets: 450 connections and 270000 calls per second.
[18:32:17.177814][2489483][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:32:48.129829][2489489][I] Stopping after 29999 ms. Initiated: 225543 / Completed: 225510. (Completion rate was 7517.000501133367 per second.)
[18:32:48.129850][2489490][I] Stopping after 30000 ms. Initiated: 225787 / Completed: 225754. (Completion rate was 7525.1290690935275 per second.)
[18:32:48.129858][2489497][I] Stopping after 30000 ms. Initiated: 224656 / Completed: 224623. (Completion rate was 7487.431835846966 per second.)
[18:32:48.129851][2489492][I] Stopping after 30000 ms. Initiated: 224922 / Completed: 224889.
@zamazan4ik
zamazan4ik / gist:b38fff2c4db0ad7beb0fcca7d9dc741c
Created September 21, 2023 16:41
HAProxy GCC Optimized new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 120 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:38:57.311073][2492766][I] Detected 9 (v)CPUs with affinity..
[18:38:57.311112][2492766][I] Starting 9 threads / event loops. Time limit: 120 seconds.
[18:38:57.311115][2492766][I] Global targets: 450 connections and 270000 calls per second.
[18:38:57.311118][2492766][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:40:58.263196][2492776][I] Stopping after 120000 ms. Initiated: 28869 / Completed: 28868. (Completion rate was 240.56666666666666 per second.)
[18:40:58.263214][2492773][I] Stopping after 120000 ms. Initiated: 933235 / Completed: 933202. (Completion rate was 7776.681453968648 per second.)
[18:40:58.263223][2492781][I] Stopping after 120000 ms. Initiated: 938408 / Completed: 938375. (Completion rate was 7819.790689192831 per second.)
[18:40:58.263199][2492774][I] Stopping after 120000 ms. Initiated: 938596 / Completed: 938
@zamazan4ik
zamazan4ik / gist:86eb48106929e470116749f405ca460f
Created September 21, 2023 16:45
HAProxy GCC Release new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 120 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:42:03.904858][2494457][I] Detected 9 (v)CPUs with affinity..
[18:42:03.904897][2494457][I] Starting 9 threads / event loops. Time limit: 120 seconds.
[18:42:03.904900][2494457][I] Global targets: 450 connections and 270000 calls per second.
[18:42:03.904902][2494457][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:44:04.856943][2494463][I] Stopping after 119999 ms. Initiated: 905084 / Completed: 905051. (Completion rate was 7542.09172951743 per second.)
[18:44:04.856964][2494464][I] Stopping after 120000 ms. Initiated: 27494 / Completed: 27493. (Completion rate was 229.10830087632405 per second.)
[18:44:04.856967][2494469][I] Stopping after 120000 ms. Initiated: 903919 / Completed: 903887. (Completion rate was 7532.391038967414 per second.)
[18:44:04.856988][2494473][I] Stopping after 120000 ms. Initiated: 904652 / Completed: 9046
@zamazan4ik
zamazan4ik / gist:873a58e80ef644d0d9a2ea5dfcc87bfd
Created September 21, 2023 16:51
HAProxy Clang Instrumented new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 30 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:47:44.258113][2498060][I] Detected 9 (v)CPUs with affinity..
[18:47:44.258152][2498060][I] Starting 9 threads / event loops. Time limit: 30 seconds.
[18:47:44.258155][2498060][I] Global targets: 450 connections and 270000 calls per second.
[18:47:44.258158][2498060][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:48:15.210243][2498066][I] Stopping after 30000 ms. Initiated: 162613 / Completed: 162580. (Completion rate was 5419.332610755651 per second.)
[18:48:15.210253][2498068][I] Stopping after 30000 ms. Initiated: 162941 / Completed: 162908. (Completion rate was 5430.265218595941 per second.)
[18:48:15.210276][2498069][I] Stopping after 30000 ms. Initiated: 162770 / Completed: 162737. (Completion rate was 5424.561603742503 per second.)
[18:48:15.210282][2498076][I] Stopping after 30000 ms. Initiated: 163429 / Completed: 163396.
@zamazan4ik
zamazan4ik / gist:351847079ccd2d605b59859e63e03509
Created September 21, 2023 16:54
HAProxy Clang Release new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 120 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:52:06.379749][2500840][I] Detected 9 (v)CPUs with affinity..
[18:52:06.379797][2500840][I] Starting 9 threads / event loops. Time limit: 120 seconds.
[18:52:06.379800][2500840][I] Global targets: 450 connections and 270000 calls per second.
[18:52:06.379804][2500840][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:54:07.332330][2500846][I] Stopping after 120000 ms. Initiated: 878462 / Completed: 878429. (Completion rate was 7320.241117648583 per second.)
[18:54:07.332343][2500853][I] Stopping after 120000 ms. Initiated: 879066 / Completed: 879033. (Completion rate was 7325.274694780221 per second.)
[18:54:07.332348][2500848][I] Stopping after 120000 ms. Initiated: 878659 / Completed: 878626. (Completion rate was 7321.8821130196475 per second.)
[18:54:07.332350][2500847][I] Stopping after 120000 ms. Initiated: 878793 / Completed: 8
@zamazan4ik
zamazan4ik / gist:6ac2a3be941e5c594c82c9e7dd47db16
Created September 21, 2023 16:58
HAProxy Clang optimized new config
taskset -c 15-23 ./nighthawk_client --rps 30000 --duration 120 --connections 50 --concurrency auto --prefetch-connections -v info http://127.0.0.1:8080
[18:56:07.007407][2504277][I] Detected 9 (v)CPUs with affinity..
[18:56:07.007447][2504277][I] Starting 9 threads / event loops. Time limit: 120 seconds.
[18:56:07.007450][2504277][I] Global targets: 450 connections and 270000 calls per second.
[18:56:07.007452][2504277][I] (Per-worker targets: 50 connections and 30000 calls per second)
[18:58:07.959475][2504285][I] Stopping after 120000 ms. Initiated: 822374 / Completed: 822341. (Completion rate was 6852.841552452641 per second.)
[18:58:07.959479][2504284][I] Stopping after 120000 ms. Initiated: 822270 / Completed: 822237. (Completion rate was 6851.974429002131 per second.)
[18:58:07.959486][2504283][I] Stopping after 120000 ms. Initiated: 821896 / Completed: 821863. (Completion rate was 6848.857077709536 per second.)
[18:58:07.959503][2504291][I] Stopping after 120000 ms. Initiated: 822019 / Completed: 82