Algorithm-EventsPerSecond
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use Config;
# IF_OPT sets the -O value used to compile the XS backend (default -O3).
# IF_ARCH optionally sets the target arch, e.g. IF_ARCH=native for
# -march=native. Both accept a bare value or a full compiler flag.
my $optimize = defined $ENV{IF_OPT} && length $ENV{IF_OPT} ? $ENV{IF_OPT} : '3';
$optimize = "-O$optimize" unless $optimize =~ /^-/;
my $arch_flags = '';
if ( defined $ENV{IF_ARCH} && length $ENV{IF_ARCH} ) {
$arch_flags = $ENV{IF_ARCH};
$arch_flags = "-march=$arch_flags" unless $arch_flags =~ /^-/;
}
# The XS backend is optional: without a working compiler (or with
# PUREPERL_ONLY=1) the module installs as pure Perl and
# Algorithm::EventsPerSecond falls back automatically.
my $pureperl_only = grep { /^PUREPERL_ONLY=(\S+)$/ && $1 } @ARGV;
my $can_xs = !$pureperl_only
&& eval { ExtUtils::MakeMaker->VERSION('7.12'); 1 } # XSMULTI
&& _have_compiler();
Makefile.PL view on Meta::CPAN
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => {
FILES => join ' ', 'Algorithm-EventsPerSecond-*',
map { "lib/Algorithm/EventsPerSecond/XS.$_" } qw(c o bs),
},
(
$can_xs
? (
XSMULTI => 1,
OPTIMIZE => $optimize,
( $arch_flags ? ( CCFLAGS => "$Config{ccflags} $arch_flags" ) : () ),
)
: ()
),
);
# Compatibility with old versions of ExtUtils::MakeMaker
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
my $test_requires = delete $WriteMakefileArgs{TEST_REQUIRES} || {};
@{$WriteMakefileArgs{PREREQ_PM}}{keys %$test_requires} = values %$test_requires;
}
rc/freebsd/iqbi_damiq view on Meta::CPAN
# iqbi_damiq_max_keys (int): Distinct-key ceiling, 0 for
# unlimited. Default "100000".
# iqbi_damiq_idle_timeout (int): Evict keys unmarked this long, in
# seconds; may not be less than the
# window. Default is twice the window.
# iqbi_damiq_sweep_interval (int): Seconds between eviction sweeps.
# Default "30".
# iqbi_damiq_user (user): User to run as. Default "nobody".
# iqbi_damiq_group (group): Group owning the run directory.
# Default "nobody".
# iqbi_damiq_flags (str): Extra iqbi-damiq flags, e.g. "-x".
. /etc/rc.subr
name="iqbi_damiq"
rcvar="iqbi_damiq_enable"
load_rc_config $name
: ${iqbi_damiq_enable:="NO"}
: ${iqbi_damiq_socket:="/var/run/iqbi-damiq/iqbi-damiq.sock"}
rc/systemd/iqbi-damiq.service view on Meta::CPAN
#
# IQBI_DAMIQ_WINDOW=300 # averaging window, seconds
# IQBI_DAMIQ_MAX_KEYS=500000 # distinct-key ceiling, 0 unlimited
# IQBI_DAMIQ_IDLE_TIMEOUT=600 # evict keys unmarked this long;
# # must be at least the window, so
# # raise it when raising the window
# IQBI_DAMIQ_SWEEP_INTERVAL=30 # seconds between eviction sweeps
# IQBI_DAMIQ_SOCKET_MODE=0660 # socket file mode
#
# Neither file existing is fine; everything falls back to the defaults
# below. Adjust other flags with `systemctl edit iqbi-damiq` (an
# override.conf with an emptied and re-set ExecStart), e.g. to add -x.
[Unit]
Description=iqbi-damiq per-key sliding-window event rate daemon
Documentation=man:iqbi-damiq(1)
After=local-fs.target
[Service]
Type=exec
# The daemon stays in the foreground and shuts down cleanly on TERM.
( run in 1.961 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )