Skip to content

Commit

Permalink
moved Monitoring to core, closes #100
Browse files Browse the repository at this point in the history
  • Loading branch information
eileen-kuehn committed Dec 14, 2020
1 parent 602042e commit e7d4704
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lapis/cli/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from lapis.scheduler import CondorJobScheduler
from lapis.simulator import Simulator

from lapis.monitor import (
from lapis.monitor.core import (
LoggingSocketHandler,
LoggingUDPSocketHandler,
SimulationTimeFilter,
Expand Down
6 changes: 3 additions & 3 deletions lapis/drone.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def available_resources(self) -> Dict[str, float]:
return dict(self.used_resources.levels)

async def run(self):
from lapis.monitor import sampling_required
from lapis.monitor.core import sampling_required

await (time + self.scheduling_duration)
self._supply = 1
Expand Down Expand Up @@ -98,7 +98,7 @@ def _init_allocation_and_utilisation(self):
self._utilisation = min(resources)

async def shutdown(self):
from lapis.monitor import sampling_required
from lapis.monitor.core import sampling_required

self._supply = 0
self.scheduler.unregister_drone(self)
Expand All @@ -121,7 +121,7 @@ async def _run_job(self, job: Job, kill: bool):
"""
job.drone = self
async with Scope() as scope:
from lapis.monitor import sampling_required
from lapis.monitor.core import sampling_required

self._utilisation = self._allocation = None

Expand Down
2 changes: 1 addition & 1 deletion lapis/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from usim import time, Queue
from usim import CancelTask

from lapis.monitor import sampling_required
from lapis.monitor.core import sampling_required

if TYPE_CHECKING:
from lapis.drone import Drone
Expand Down
2 changes: 1 addition & 1 deletion lapis/monitor/cobald.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List, Dict

from lapis.drone import Drone
from lapis.monitor import LoggingSocketHandler, LoggingUDPSocketHandler
from lapis.monitor.core import LoggingSocketHandler, LoggingUDPSocketHandler
from lapis.pool import Pool


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lapis/monitor/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from lapis.drone import Drone
from lapis.job import Job
from lapis.monitor import LoggingSocketHandler, LoggingUDPSocketHandler
from lapis.monitor.core import LoggingSocketHandler, LoggingUDPSocketHandler
from lapis.pool import Pool
from lapis.scheduler import CondorJobScheduler, JobQueue

Expand Down
2 changes: 1 addition & 1 deletion lapis/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from lapis.drone import Drone
from lapis.job import Job
from lapis.monitor import sampling_required
from lapis.monitor.core import sampling_required


class JobQueue(list):
Expand Down
2 changes: 1 addition & 1 deletion lapis/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
configuration_information,
job_events,
)
from lapis.monitor import Monitoring
from lapis.monitor.core import Monitoring
from lapis.monitor.cobald import drone_statistics, pool_statistics


Expand Down
2 changes: 1 addition & 1 deletion lapis_tests/utility/test_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from . import make_test_logger

from lapis.monitor.general import resource_statistics
from lapis.monitor import SimulationTimeFilter, Monitoring
from lapis.monitor.core import SimulationTimeFilter, Monitoring


def parse_line_protocol(literal: str):
Expand Down

0 comments on commit e7d4704

Please sign in to comment.