X7ROOT File Manager
Current Path:
/lib/python3.6/site-packages/tuned/profiles/functions
lib
/
python3.6
/
site-packages
/
tuned
/
profiles
/
functions
/
📁
..
📄
__init__.py
(35 B)
📁
__pycache__
📄
base.py
(1.02 KB)
📄
function_assertion.py
(767 B)
📄
function_assertion_non_equal.py
(811 B)
📄
function_calc_isolated_cores.py
(1.6 KB)
📄
function_check_net_queue_count.py
(650 B)
📄
function_cpuinfo_check.py
(1011 B)
📄
function_cpulist2devs.py
(460 B)
📄
function_cpulist2hex.py
(470 B)
📄
function_cpulist2hex_invert.py
(624 B)
📄
function_cpulist_invert.py
(659 B)
📄
function_cpulist_online.py
(651 B)
📄
function_cpulist_pack.py
(637 B)
📄
function_cpulist_present.py
(691 B)
📄
function_cpulist_unpack.py
(511 B)
📄
function_exec.py
(487 B)
📄
function_hex2cpulist.py
(472 B)
📄
function_kb2s.py
(405 B)
📄
function_regex_search_ternary.py
(554 B)
📄
function_s2kb.py
(417 B)
📄
function_strip.py
(406 B)
📄
function_virt_check.py
(595 B)
📄
functions.py
(2.1 KB)
📄
repository.py
(1.25 KB)
Editing: function_assertion.py
import os import tuned.logs from . import base from tuned.utils.commands import commands from tuned.profiles.exceptions import InvalidProfileException log = tuned.logs.get() class assertion(base.Function): """ Assertion: compares argument 2 with argument 3. If they don't match it logs text from argument 1 and throws InvalidProfileException. This exception will abort profile loading. """ def __init__(self): # 3 arguments super(assertion, self).__init__("assertion", 3, 3) def execute(self, args): if not super(assertion, self).execute(args): return None if args[1] != args[2]: log.error("assertion '%s' failed: '%s' != '%s'" % (args[0], args[1], args[2])) raise InvalidProfileException("Assertion '%s' failed." % args[0]) return None
Upload File
Create Folder