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

filter: Statementstmt 92.3% 12 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 4 totaltotal 75.0% 18 / 24 CC 1 SCAR 0.2
CC
1
Cov
92%
__ANON__
1.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Netcls.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Freezer.pm »
1 package Mojo::IOLoop::ReadWriteProcess::CGroup::v2::CPU;
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 STAT_INTERFACE => 'cpu.stat',
7 WEIGHT_INTERFACE => 'cpu.weight',
8 WEIGHT_NICE_INTERFACE => 'cpu.weight.nice',
9 MAX_INTERFACE => 'cpu.max',
10 15 };
11  
12 0 ▶has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v2->new };
Subroutine __ANON__: not called CC=1 SCAR=1.2
13  
14 1 ▶sub stat { shift->cgroup->_list(STAT_INTERFACE) }
Subroutine stat: called CC=1 SCAR=0.0
Pod undocumented
15 2 ▶sub weight { shift->cgroup->_setget(WEIGHT_INTERFACE, @_) }
Subroutine weight: called CC=1 SCAR=0.0
Pod undocumented
16 2 ▶sub weight_nice { shift->cgroup->_setget(WEIGHT_NICE_INTERFACE, @_) }
Subroutine weight_nice: called CC=1 SCAR=0.0
Pod undocumented
17 2 ▶sub max { shift->cgroup->_setget(MAX_INTERFACE, @_) }
Subroutine max: called CC=1 SCAR=0.0
Pod undocumented
18  
19 15 1;
20  
21 =encoding utf-8
22  
23 =head1 NAME
24  
25 Mojo::IOLoop::ReadWriteProcess::CGroup::v2::CPU - CGroups v2 CPU Controller
26  
27 =head1 SYNOPSIS
28  
29 use Mojo::IOLoop::ReadWriteProcess::CGroup::v2;
30  
31 my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v2->new( name => "test" );
32  
33 $cgroup->cpu->stat;
34  
35 =head1 DESCRIPTION
36  
37 This module uses features that are only available on Linux kernels.
38  
39 =head1 METHODS
40  
41 L<Mojo::IOLoop::ReadWriteProcess::CGroup::v2::CPU> inherits all methods from L<Mojo::Base> and implements
42 the following new ones.
43  
44 =head1 LICENSE
45  
46 Copyright (C) Ettore Di Giacinto.
47  
48 This library is free software; you can redistribute it and/or modify
49 it under the same terms as Perl itself.
50  
51 =head1 AUTHOR
52  
53 Ettore Di Giacinto E<lt>edigiacinto@suse.comE<gt>
54  
55 =cut
« lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Netcls.pm ↑ Summary lib/Mojo/IOLoop/ReadWriteProcess/CGroup/v1/Freezer.pm »