Skip to content
Snippets Groups Projects
Commit 80eb0f88 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Adds some documentation

parent cc122d3c
No related branches found
No related tags found
No related merge requests found
# Documentation for leverages
Classical skeleton
class Leverage:
'Skeleton for leverages'
def __init__(self, leverage_argument):
'Mainly used to store arguments'
pass
def build(self, executor):
'Used to build the binary or obtain information on the plateform'
pass
def available_states(self):
'Returns the list of avaiable states'
return [None]
def start(self, state):
'Use the leverage with the state in argument'
pass
def stop(self,output_file=None):
'Stops the leverage and, if needed, write info in an output file'
pass
def get_state(self):
'Retuns the current state in internal format'
return None
def state_to_str(self):
'Returns the current state in string format'
return 'None'
def get_labels(self):
'Retuns the string associated with the states'
return 'Leverage'
...@@ -48,6 +48,9 @@ set_pct () { ...@@ -48,6 +48,9 @@ set_pct () {
# echo $PCT | ${SUDO} tee /sys/devices/system/cpu/intel_pstate/max_perf_pct # echo $PCT | ${SUDO} tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
} }
set_noboost () {
echo $NOBOOST | tee /sys/devices/system/cpu/intel_pstate/no_turbo
}
if [ $1 == 'init' ] if [ $1 == 'init' ]
then then
...@@ -67,3 +70,8 @@ then ...@@ -67,3 +70,8 @@ then
PCT=$2 PCT=$2
set_pct set_pct
fi fi
if [ $1 == 'noboost' ]
then
NOBOOST=$2
set_noboost
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment