puddle.Pool (and the x/sync/semaphore it gates acquires on) hands a released
resource to the first waiter by closing that waiter's channel. The Go runtime
readies a goroutine unblocked by a channel operation into the waker's own P as
runnext, where it runs only once the waker blocks, is preempted, or another P
steals it, and runnext is the last thing a stealing P tries. So while every P
is busy, a resource released by a goroutine that goes on doing CPU work is held
by nobody until that work ends. On a pool of 4 with the releaser doing 2 ms of
work after Release, that is ~1.85 ms per acquire, and throughput drops by a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module natsrepro | |
| go 1.25 | |
| require ( | |
| github.com/nats-io/nats-server/v2 v2.15.0 | |
| github.com/nats-io/nats.go v1.54.0 | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/sh python | |
| import collections | |
| import itertools | |
| import os.path | |
| import requests | |
| Item = collections.namedtuple('Item', ['label', 'data']) | |
| DIR = 'playlists' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-reagent () { | |
| for agent in /tmp/ssh-*/agent.*; do | |
| export SSH_AUTH_SOCK=$agent | |
| if ssh-add -l 2>&1 > /dev/null; then | |
| echo Found working SSH Agent: | |
| ssh-add -l | |
| return | |
| fi | |
| done | |
| echo Cannot find ssh agent - maybe you should reconnect and forward it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAy5B0olC1RlzH1CrMukhRsnoTBhK/irnYLSJutJHullOeopTpqK+ph8ZKDKAaCqpAs2Y/Km3Kb1IvBiT9CDGPDh9N/PzvTbB9aSSUGsQQClxTCd0eTPmYwEi545lpVfrRCuAfEdcr4wd6FR3O0aEfxRXnIedFi22/XVXzIAvETr72mvJ/ED62D9Viri+nJsIOizpueV0PN+3OFU5CU/MpHuIrDm796mmlF3omeYpvCBnRTSXhZj1SsfMW4qpRaab9LDMptWTrxPAbwwWUQpHlUc0SI0zPjGUXILlNLGqkNNNpFXnn20KLeKY4EYgoLB3csak+hGnTX8hh8Hgnm46VIQ== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set daemon 30 with start delay 60 | |
| set logfile syslog facility log_daemon | |
| set httpd port 2812 | |
| allow localhost | |
| set mailserver localhost | |
| set alert alert@example.com but not on { instance } | |
| mail-format { | |
| From: noreply@example.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Set /proc/self/oom_adj to [[:digit:]]+$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Connection from [:[:xdigit:].]+ port [[:digit:]]{1,5}$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Found matching (RSA|DSA) key: [[:xdigit:]:]{47}$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Failed publickey for [[:alnum:]]+ from [:[:xdigit:].]+ port [[:digit:]]{1,5} ssh2$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Read error from remote host [.[:xdigit:]:]+: Connection timed out$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Read error from remote host [.[:xdigit:]:]+: Connection reset by peer$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: User child is on pid [[:digit:]]{1,5}$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set mailserver localhost | |
| set daemon 120 with start delay 240 | |
| set logfile syslog facility log_daemon | |
| set httpd port 2812 | |
| allow localhost | |
| set alert noreply@example.com | |
| check host internet with address 80.254.111.254 | |
| if failed icmp type echo count 5 with timeout 30 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Set /proc/self/oom_adj to [[:digit:]]+$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Connection from [:[:xdigit:].]+ port [[:digit:]]{1,5}$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Found matching (RSA|DSA) key: [[:xdigit:]:]{47}$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Failed publickey for [[:alnum:]]+ from [:[:xdigit:].]+ port [[:digit:]]{1,5} ssh2$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: Read error from remote host [.[:xdigit:]:]+: Connection timed out$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ sshd\[[[:digit:]]+\]: User child is on pid [[:digit:]]{1,5}$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: Last full backup is too old, forcing full backup$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: Local and Remote metadata are synchronized, no sync needed\.$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: No old backup sets found, nothing deleted\.$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: No extraneous files found, nothing deleted in cleanup\.$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: Last full backup date: \w{3} \w{3} [ :[:digit:]]{16}$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: --------------\[ Backup Statistics \]--------------$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: -------------------------------------------------$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ duplicity: (StartTime|EndTime|ElapsedTime|SourceFiles|SourceFileSize|NewFiles|NewFileSize|DeletedFiles|ChangedFiles|ChangedFileSize|ChangedDeltaSize|DeltaEntries|RawDeltaSize|TotalDestinationSizeChange) .+$ | |
| ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ |
NewerOlder