lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v2/Memory.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 0.0% 0 / 8 totaltotal 72.2% 26 / 36 CC 1 SCAR 0.1
CC
1
Cov
94%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Cpuset.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Memory.pm »
1 package Mojo::IOLoop::ReadWriteProcess::CGroup::v2::Memory;
2  
3 15 ▶use Mojo::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 15 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 CURRENT_INTERFACE => 'memory.current',
7 LOW_INTERFACE => 'memory.low',
8 HIGH_INTERFACE => 'memory.high',
9 MAX_INTERFACE => 'memory.max',
10 EVENTS_INTERFACE => 'memory.events',
11 STAT_INTERFACE => 'memory.stat',
12 SWAP_CURRENT_INTERFACE => 'memory.swap.current',
13 SWAP_MAX_INTERFACE => 'memory.swap.max',
14 15 };
15  
16  
17 0 ▶has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v2->new };
Subroutine __ANON__: not called CC=1 SCAR=1.2
18  
19 1 ▶sub current { shift->cgroup->_list(CURRENT_INTERFACE) }
Subroutine current: called CC=1 SCAR=0.0
Pod undocumented
20 1 ▶sub swap_current { shift->cgroup->_list(SWAP_CURRENT_INTERFACE) }
Subroutine swap_current: called CC=1 SCAR=0.0
Pod undocumented
21 2 ▶sub low { shift->cgroup->_setget(LOW_INTERFACE, @_) }
Subroutine low: called CC=1 SCAR=0.0
Pod undocumented
22 2 ▶sub high { shift->cgroup->_setget(HIGH_INTERFACE, @_) }
Subroutine high: called CC=1 SCAR=0.0
Pod undocumented
23 2 ▶sub max { shift->cgroup->_setget(MAX_INTERFACE, @_) }
Subroutine max: called CC=1 SCAR=0.0
Pod undocumented
24 2 ▶sub swap_max { shift->cgroup->_setget(SWAP_MAX_INTERFACE, @_) }
Subroutine swap_max: called CC=1 SCAR=0.0
Pod undocumented
25 1 ▶sub events { shift->cgroup->_list(EVENTS_INTERFACE) }
Subroutine events: called CC=1 SCAR=0.0
Pod undocumented
26 1 ▶sub stat { shift->cgroup->_list(STAT_INTERFACE) }
Subroutine stat: called CC=1 SCAR=0.0
Pod undocumented
27  
28 15 1;
29  
30 =encoding utf-8
31  
32 =head1 NAME
33  
34 Mojo::IOLoop::ReadWriteProcess::CGroup::v2::Memory - CGroups v2 Memory Controller
35  
36 =head1 SYNOPSIS
37  
38 use Mojo::IOLoop::ReadWriteProcess::CGroup::v2;
39  
40 my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v2->new( name => "test" );
41  
42 $cgroup->memory->current;
43  
44 =head1 DESCRIPTION
45  
46 This module uses features that are only available on Linux kernels.
47  
48 =head1 METHODS
49  
50 L<Mojo::IOLoop::ReadWriteProcess::CGroup::v2::Memory> inherits all methods from L<Mojo::Base> and implements
51 the following new ones.
52  
53 =head1 LICENSE
54  
55 Copyright (C) Ettore Di Giacinto.
56  
57 This library is free software; you can redistribute it and/or modify
58 it under the same terms as Perl itself.
59  
60 =head1 AUTHOR
61  
62 Ettore Di Giacinto E<lt>edigiacinto@suse.comE<gt>
63  
64 =cut
« lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Cpuset.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Memory.pm »