cloud-files 6.4.2__tar.gz → 6.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloud_files-6.4.2 → cloud_files-6.4.3}/ChangeLog +6 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/PKG-INFO +1 -1
- {cloud_files-6.4.2 → cloud_files-6.4.3}/automated_test.py +18 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/PKG-INFO +1 -1
- cloud_files-6.4.3/cloud_files.egg-info/pbr.json +1 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/monitoring.py +10 -3
- cloud_files-6.4.2/cloud_files.egg-info/pbr.json +0 -1
- {cloud_files-6.4.2 → cloud_files-6.4.3}/.github/workflows/test-suite.yml +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/AUTHORS +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/LICENSE +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/MANIFEST.in +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/README.md +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/SOURCES.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/dependency_links.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/entry_points.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/not-zip-safe +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/requires.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloud_files.egg-info/top_level.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/__init__.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/cloudfiles.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/compression.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/connectionpools.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/exceptions.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/gcs.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/interfaces.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/lib.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/paths.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/resumable_tools.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/scheduler.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/secrets.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/threaded_queue.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles/typing.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles_cli/LICENSE +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles_cli/__init__.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles_cli/cloudfiles_cli.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/cloudfiles_cli/listing_db.py +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/requirements.txt +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/setup.cfg +0 -0
- {cloud_files-6.4.2 → cloud_files-6.4.3}/setup.py +0 -0
|
@@ -1458,3 +1458,21 @@ class TestTransmissionMonitor:
|
|
|
1458
1458
|
|
|
1459
1459
|
assert new_monitor.total_bytes() == 100
|
|
1460
1460
|
assert hasattr(new_monitor, '_lock')
|
|
1461
|
+
|
|
1462
|
+
def test_slow_clock_tick(self, tx_monitor):
|
|
1463
|
+
import time
|
|
1464
|
+
|
|
1465
|
+
real_monotonic = time.monotonic
|
|
1466
|
+
time.monotonic = lambda: 1
|
|
1467
|
+
|
|
1468
|
+
flight_id = tx_monitor.start_io(100)
|
|
1469
|
+
time.sleep(0.01)
|
|
1470
|
+
tx_monitor.end_io(flight_id, 100)
|
|
1471
|
+
|
|
1472
|
+
assert len(tx_monitor._in_flight) == 0
|
|
1473
|
+
assert tx_monitor._in_flight_bytes == 0
|
|
1474
|
+
assert tx_monitor._total_bytes_landed == 100
|
|
1475
|
+
assert len(tx_monitor._intervaltree) == 1
|
|
1476
|
+
|
|
1477
|
+
time.monotonic = real_monotonic
|
|
1478
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "f3f1e45", "is_release": true}
|
|
@@ -10,6 +10,8 @@ import intervaltree
|
|
|
10
10
|
import numpy as np
|
|
11
11
|
import numpy.typing as npt
|
|
12
12
|
|
|
13
|
+
EPSILON_SEC = 1e-7
|
|
14
|
+
|
|
13
15
|
class IOEnum(enum.Enum):
|
|
14
16
|
RX = 1
|
|
15
17
|
TX = 2
|
|
@@ -63,6 +65,8 @@ class TransmissionMonitor:
|
|
|
63
65
|
|
|
64
66
|
with self._lock:
|
|
65
67
|
start_us = int(self._in_flight.pop(flight_id) * 1e6)
|
|
68
|
+
if start_us == end_us:
|
|
69
|
+
end_us += 1
|
|
66
70
|
self._in_flight_bytes -= num_bytes
|
|
67
71
|
self._intervaltree.addi(start_us, end_us, [flight_id, num_bytes])
|
|
68
72
|
self._total_bytes_landed += num_bytes
|
|
@@ -662,7 +666,7 @@ class IOSampler:
|
|
|
662
666
|
time.monotonic()
|
|
663
667
|
time.monotonic()
|
|
664
668
|
e = time.monotonic()
|
|
665
|
-
return (e - s) / 5
|
|
669
|
+
return ((e - s) / 5) or EPSILON_SEC
|
|
666
670
|
|
|
667
671
|
time_correction = measure_correction()
|
|
668
672
|
psutil.net_io_counters.cache_clear()
|
|
@@ -679,12 +683,15 @@ class IOSampler:
|
|
|
679
683
|
recorrection_start = time.monotonic()
|
|
680
684
|
|
|
681
685
|
e = time.monotonic()
|
|
686
|
+
elapsed = (e-s) or EPSILON_SEC
|
|
682
687
|
|
|
683
|
-
wait = interval -
|
|
688
|
+
wait = interval - elapsed
|
|
684
689
|
if wait > 0:
|
|
685
690
|
time.sleep(wait)
|
|
686
691
|
|
|
687
|
-
|
|
692
|
+
elapsed = (time.monotonic() - e) or EPSILON_SEC
|
|
693
|
+
|
|
694
|
+
if (interval * 0.5) < elapsed:
|
|
688
695
|
self._do_sample(time_correction)
|
|
689
696
|
|
|
690
697
|
def is_sampling(self):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "fff3997", "is_release": true}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|