MCPcopy Create free account
hub / github.com/mlco2/codecarbon / heavy_computation

Function heavy_computation

tests/test_logging_output.py:16–21  ·  view source on GitHub ↗
(run_time_secs: int = 3)

Source from the content-addressed store, hash-verified

14
15
16def heavy_computation(run_time_secs: int = 3):
17 end_time: float = (
18 time.perf_counter() + run_time_secs
19 ) # Run for `run_time_secs` seconds
20 while time.perf_counter() < end_time:
21 pass
22
23
24class TestCarbonTrackerFlush(unittest.TestCase):

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…