Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nrm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
nrm
Commits
67f5959e
Commit
67f5959e
authored
Dec 03, 2018
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding logging points.
parent
e7ac19d0
Pipeline
#4407
failed with stages
in 2 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
nrm/controller.py
nrm/controller.py
+4
-2
nrm/daemon.py
nrm/daemon.py
+2
-0
No files found.
nrm/controller.py
View file @
67f5959e
...
@@ -74,8 +74,10 @@ class PowerActuator(object):
...
@@ -74,8 +74,10 @@ class PowerActuator(object):
return
actions
return
actions
def
execute
(
self
,
action
):
def
execute
(
self
,
action
):
logger
.
info
(
"changing power limit. command: %r, delta: %r, target: %r"
,
action
.
command
,
logger
.
info
(
"changing power limit. command: %r, delta: %r, target: %r"
,
action
.
delta
,
action
.
target
)
action
.
command
,
action
.
delta
,
action
.
target
)
# sensor_manager is a SensorManager, which is not only about sensing
# but also about setting power limits.
self
.
sensor_manager
.
set_powerlimit
(
action
.
target
,
action
.
command
)
self
.
sensor_manager
.
set_powerlimit
(
action
.
target
,
action
.
command
)
def
update
(
self
,
action
):
def
update
(
self
,
action
):
...
...
nrm/daemon.py
View file @
67f5959e
...
@@ -168,9 +168,11 @@ class Daemon(object):
...
@@ -168,9 +168,11 @@ class Daemon(object):
logger
.
info
(
"sending sensor message: %r"
,
msg
)
logger
.
info
(
"sending sensor message: %r"
,
msg
)
def
do_control
(
self
):
def
do_control
(
self
):
logger
.
info
(
"Asking controller to plan for target %s using machine info %s"
%
(
self
.
target
,
self
.
machine_info
))
plan
=
self
.
controller
.
planify
(
self
.
target
,
self
.
machine_info
)
plan
=
self
.
controller
.
planify
(
self
.
target
,
self
.
machine_info
)
logger
.
info
(
"Controller chose plan "
+
str
(
plan
))
logger
.
info
(
"Controller chose plan "
+
str
(
plan
))
action
,
actuator
=
plan
action
,
actuator
=
plan
logger
.
info
(
"Action target:%s command:%s delta:%s was computed by the power controller."
%
(
action
.
target
,
action
.
command
,
action
.
delta
))
if
action
:
if
action
:
self
.
controller
.
execute
(
action
,
actuator
)
self
.
controller
.
execute
(
action
,
actuator
)
self
.
controller
.
update
(
action
,
actuator
)
self
.
controller
.
update
(
action
,
actuator
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment