rclone-api 1.1.58__tar.gz → 1.1.60__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.
- {rclone_api-1.1.58 → rclone_api-1.1.60}/PKG-INFO +1 -1
- {rclone_api-1.1.58 → rclone_api-1.1.60}/pyproject.toml +1 -1
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/profile/mount_copy_bytes.py +60 -28
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/PKG-INFO +1 -1
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.aiderignore +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.github/workflows/lint.yml +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.github/workflows/push_macos.yml +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.github/workflows/push_ubuntu.yml +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.github/workflows/push_win.yml +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.gitignore +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.pylintrc +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.vscode/launch.json +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.vscode/settings.json +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/.vscode/tasks.json +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/LICENSE +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/MANIFEST.in +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/README.md +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/clean +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/install +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/lint +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/requirements.testing.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/setup.cfg +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/setup.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/__init__.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/assets/example.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/cli.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/cmd/copy_large_s3.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/cmd/list_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/completed_process.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/config.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/convert.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/deprecated.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/diff.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/dir.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/dir_listing.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/exec.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/experimental/flags.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/experimental/flags_base.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/file.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/filelist.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/group_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/mount.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/process.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/rclone.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/remote.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/rpath.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/api.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/basic_ops.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/chunk_file.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/chunk_types.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/create.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/types.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/s3/upload_file_multipart.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/scan_missing_folders.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/types.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/util.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api/walk.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/SOURCES.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/dependency_links.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/entry_points.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/requires.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/src/rclone_api.egg-info/top_level.txt +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/test +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/archive/test_paramiko.py.disabled +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_cmd_list_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_copy.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_copy_bytes.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_copy_file_resumable_s3.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_copy_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_diff.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_group_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_is_synced.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_ls.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_mount.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_mount_s3.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_obscure.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_rclone_config.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_remote_control.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_remotes.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_s3.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_scan_missing_folders.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_size_files.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_size_suffix.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tests/test_walk.py +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/tox.ini +0 -0
- {rclone_api-1.1.58 → rclone_api-1.1.60}/upload_package.sh +0 -0
|
@@ -6,7 +6,7 @@ import argparse
|
|
|
6
6
|
import os
|
|
7
7
|
import shutil
|
|
8
8
|
import time
|
|
9
|
-
from concurrent.futures import
|
|
9
|
+
from concurrent.futures import Future, ThreadPoolExecutor
|
|
10
10
|
from dataclasses import dataclass
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
|
|
@@ -21,7 +21,8 @@ os.environ["RCLONE_API_VERBOSE"] = "1"
|
|
|
21
21
|
@dataclass
|
|
22
22
|
class Args:
|
|
23
23
|
direct_io: bool
|
|
24
|
-
num: int
|
|
24
|
+
num: int
|
|
25
|
+
size: SizeSuffix | None
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
@dataclass
|
|
@@ -107,7 +108,8 @@ def _run_profile(
|
|
|
107
108
|
offset: SizeSuffix,
|
|
108
109
|
size: SizeSuffix,
|
|
109
110
|
log_dir: Path,
|
|
110
|
-
|
|
111
|
+
num: int,
|
|
112
|
+
direct_io: bool,
|
|
111
113
|
) -> None:
|
|
112
114
|
|
|
113
115
|
mount_log = log_dir / f"mount_{SizeSuffix(size)}_threads_{transfers}.log"
|
|
@@ -136,9 +138,9 @@ def _run_profile(
|
|
|
136
138
|
assert len(bytes_or_err) == size.as_int(), f"Length: {len(bytes_or_err)} != {size}"
|
|
137
139
|
|
|
138
140
|
# print io stats
|
|
139
|
-
bytes_sent = net_io_end.bytes_sent - net_io_start.bytes_sent
|
|
140
|
-
bytes_recv = net_io_end.bytes_recv - net_io_start.bytes_recv
|
|
141
|
-
packets_sent = net_io_end.packets_sent - net_io_start.packets_sent
|
|
141
|
+
bytes_sent = (net_io_end.bytes_sent - net_io_start.bytes_sent) // num
|
|
142
|
+
bytes_recv = (net_io_end.bytes_recv - net_io_start.bytes_recv) // num
|
|
143
|
+
packets_sent = (net_io_end.packets_sent - net_io_start.packets_sent) // num
|
|
142
144
|
efficiency = size.as_int() / (bytes_recv)
|
|
143
145
|
efficiency_100 = efficiency * 100
|
|
144
146
|
efficiency_str = f"{efficiency_100:.2f}"
|
|
@@ -156,19 +158,30 @@ def _run_profile(
|
|
|
156
158
|
print(f"Time: {diff:.1f} seconds")
|
|
157
159
|
|
|
158
160
|
|
|
159
|
-
def test_profile_copy_bytes(
|
|
161
|
+
def test_profile_copy_bytes(
|
|
162
|
+
args: Args,
|
|
163
|
+
rclone: Rclone,
|
|
164
|
+
offset: SizeSuffix,
|
|
165
|
+
transfer_list: list[int] | None,
|
|
166
|
+
mount_root_path: Path,
|
|
167
|
+
size: SizeSuffix | None,
|
|
168
|
+
num: int,
|
|
169
|
+
) -> None:
|
|
160
170
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
if size:
|
|
172
|
+
sizes = [size.as_int()]
|
|
173
|
+
else:
|
|
174
|
+
sizes = [
|
|
175
|
+
# 1024 * 1024 * 1,
|
|
176
|
+
# 1024 * 1024 * 2,
|
|
177
|
+
# 1024 * 1024 * 4,
|
|
178
|
+
# 1024 * 1024 * 8,
|
|
179
|
+
1024 * 1024 * 16,
|
|
180
|
+
# 1024 * 1024 * 32,
|
|
181
|
+
1024 * 1024 * 64,
|
|
182
|
+
1024 * 1024 * 128,
|
|
183
|
+
# 1024 * 1024 * 256,
|
|
184
|
+
]
|
|
172
185
|
# transfer_list = [1, 2, 4, 8, 16]
|
|
173
186
|
transfer_list = transfer_list or [1, 2, 4]
|
|
174
187
|
|
|
@@ -176,18 +189,17 @@ def test_profile_copy_bytes(args: Args, rclone: Rclone, offset: SizeSuffix, tran
|
|
|
176
189
|
# sftp mount
|
|
177
190
|
src_file = "src:aa_misc_data/aa_misc_data/world_lending_library_2024_11.tar.zst"
|
|
178
191
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
for size in sizes:
|
|
192
|
+
for sz in sizes:
|
|
182
193
|
for transfers in transfer_list:
|
|
183
194
|
_run_profile(
|
|
184
195
|
rclone=rclone,
|
|
185
196
|
src_file=src_file,
|
|
186
197
|
transfers=transfers,
|
|
187
198
|
offset=offset,
|
|
188
|
-
size=SizeSuffix(
|
|
199
|
+
size=SizeSuffix(sz),
|
|
189
200
|
direct_io=args.direct_io,
|
|
190
201
|
log_dir=mount_root_path,
|
|
202
|
+
num=num,
|
|
191
203
|
)
|
|
192
204
|
print("done")
|
|
193
205
|
|
|
@@ -196,8 +208,11 @@ def _parse_args() -> Args:
|
|
|
196
208
|
parser = argparse.ArgumentParser(description="Profile copy_bytes")
|
|
197
209
|
parser.add_argument("--direct-io", help="Use direct IO", action="store_true")
|
|
198
210
|
parser.add_argument("-n", "--num", help="Number of workers", type=int, default=1)
|
|
211
|
+
parser.add_argument(
|
|
212
|
+
"--size", help="Size of the file to download", type=SizeSuffix, default=None
|
|
213
|
+
)
|
|
199
214
|
args = parser.parse_args()
|
|
200
|
-
return Args(direct_io=args.direct_io, num=args.num)
|
|
215
|
+
return Args(direct_io=args.direct_io, num=args.num, size=args.size)
|
|
201
216
|
|
|
202
217
|
|
|
203
218
|
def main() -> None:
|
|
@@ -218,11 +233,24 @@ def main() -> None:
|
|
|
218
233
|
transfer_list = [1]
|
|
219
234
|
parallel_workers = args.num
|
|
220
235
|
|
|
221
|
-
def task(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
236
|
+
def task(
|
|
237
|
+
offset: SizeSuffix,
|
|
238
|
+
args=args,
|
|
239
|
+
rclone=rclone,
|
|
240
|
+
transfer_list=transfer_list,
|
|
241
|
+
mount_root_path=mount_root_path,
|
|
242
|
+
):
|
|
243
|
+
return test_profile_copy_bytes(
|
|
244
|
+
args=args,
|
|
245
|
+
rclone=rclone,
|
|
246
|
+
offset=offset,
|
|
247
|
+
mount_root_path=mount_root_path,
|
|
248
|
+
transfer_list=transfer_list,
|
|
249
|
+
size=args.size,
|
|
250
|
+
num=args.num,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
with ThreadPoolExecutor(max_workers=parallel_workers) as _:
|
|
226
254
|
tasks: list[Future] = []
|
|
227
255
|
for i in range(parallel_workers):
|
|
228
256
|
offset = SizeSuffix(i * 1024 * 1024 * 256)
|
|
@@ -231,4 +259,8 @@ def main() -> None:
|
|
|
231
259
|
|
|
232
260
|
|
|
233
261
|
if __name__ == "__main__":
|
|
262
|
+
import sys
|
|
263
|
+
|
|
264
|
+
sys.argv.append("--size")
|
|
265
|
+
sys.argv.append("16MB")
|
|
234
266
|
main()
|
|
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
|
|
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
|
|
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
|