megfile 4.1.3__py3-none-any.whl → 4.1.3.post1__py3-none-any.whl
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.
- megfile/version.py +1 -1
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/METADATA +1 -1
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/RECORD +8 -18
- megfile-4.1.3.post1.dist-info/top_level.txt +1 -0
- megfile-4.1.3.dist-info/top_level.txt +0 -5
- scripts/benchmark/code/iopath_read.py +0 -29
- scripts/benchmark/code/iopath_write.py +0 -30
- scripts/benchmark/code/megfile_read.py +0 -13
- scripts/benchmark/code/megfile_write.py +0 -14
- scripts/benchmark/code/pyarrow_read.py +0 -17
- scripts/benchmark/code/pyarrow_write.py +0 -18
- scripts/benchmark/code/s3fs_read.py +0 -21
- scripts/benchmark/code/s3fs_write.py +0 -22
- scripts/benchmark/code/smart_open_read.py +0 -25
- scripts/benchmark/code/smart_open_write.py +0 -26
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/WHEEL +0 -0
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/entry_points.txt +0 -0
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/licenses/LICENSE +0 -0
- {megfile-4.1.3.dist-info → megfile-4.1.3.post1.dist-info}/licenses/LICENSE.pyre +0 -0
megfile/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "4.1.3"
|
|
1
|
+
VERSION = "4.1.3.post1"
|
|
@@ -18,7 +18,7 @@ megfile/smart.py,sha256=Sae2KJzaU0k_qV_Bk0YifOMq8WsV5qQ2pGInDRF546I,36411
|
|
|
18
18
|
megfile/smart_path.py,sha256=Up_6xNZ2019iSzMn_JAU_1H--z-AP6O7SxdXGdeTG0c,7659
|
|
19
19
|
megfile/stdio.py,sha256=ZwxsnJNJYIT7Iyg5pIw4qiyH8bszG6oAhEJuR-hXGG4,658
|
|
20
20
|
megfile/stdio_path.py,sha256=cxaDr8rtisTPnN-rjtaEpqQnshwiqwXFUJBM9xWY7Cg,2711
|
|
21
|
-
megfile/version.py,sha256=
|
|
21
|
+
megfile/version.py,sha256=eKLHLHdKHcrWOl_XPErEVRYmoIEhUtehLCugzxSUR-E,25
|
|
22
22
|
megfile/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
megfile/lib/base_prefetch_reader.py,sha256=uxVwYknOjc8hLF7q_T2QKMsBqFcrf411ZsuK25CN1eQ,12848
|
|
24
24
|
megfile/lib/combine_reader.py,sha256=Kp2wEloOUpTlIU7dve87MBpSzmIM-F9OtpTawAjFkiU,4828
|
|
@@ -43,20 +43,10 @@ megfile/lib/stdio_handler.py,sha256=IDdgENLQlhigEwkLL4zStueVSzdWg7xVcTF_koof_Ek,
|
|
|
43
43
|
megfile/lib/url.py,sha256=ER32pWy9Q2MAk3TraAaNEBWIqUeBmLuM57ol2cs7-Ks,103
|
|
44
44
|
megfile/utils/__init__.py,sha256=xAzmICA0MtAbg-I2yPfeHjA1N4CiMP4sBrC9BgrfZLw,10151
|
|
45
45
|
megfile/utils/mutex.py,sha256=asb8opGLgK22RiuBJUnfsvB8LnMmodP8KzCVHKmQBWA,2561
|
|
46
|
-
megfile-4.1.3.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
-
megfile-4.1.3.dist-info/licenses/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
scripts/benchmark/code/pyarrow_write.py,sha256=U1puLh-ljSXv772bZYAyhzmxhPOq4aR4j-QtwdM9hG0,328
|
|
54
|
-
scripts/benchmark/code/s3fs_read.py,sha256=XiTA-qrYblUs-jQWXSnvNg5Wo722C_g47aMMfo5XJBY,380
|
|
55
|
-
scripts/benchmark/code/s3fs_write.py,sha256=gdXKkWXYGjLJlRT_J64pJN85XvRg3bZexcAJQEMXwtw,402
|
|
56
|
-
scripts/benchmark/code/smart_open_read.py,sha256=SA02jHwS9Y31yFtV9CoJcfND5dR0eA_HsGmGNUrpQls,515
|
|
57
|
-
scripts/benchmark/code/smart_open_write.py,sha256=jDxFJdY97yNH889jz3pawBoei3yaqy8pEMvC_ymHFtM,537
|
|
58
|
-
megfile-4.1.3.dist-info/METADATA,sha256=hKZKmMsgZAysVrZJ3aRQtiGRrvHnRfEPx68ayMEt3EM,9595
|
|
59
|
-
megfile-4.1.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
60
|
-
megfile-4.1.3.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
61
|
-
megfile-4.1.3.dist-info/top_level.txt,sha256=TR6xUw8Px5Ms_UENhEmLNmxOdfHAhTlSt9yTw9LRgsQ,35
|
|
62
|
-
megfile-4.1.3.dist-info/RECORD,,
|
|
46
|
+
megfile-4.1.3.post1.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
47
|
+
megfile-4.1.3.post1.dist-info/licenses/LICENSE.pyre,sha256=9lf5nT-5ZH25JijpYAequ0bl8E8z5JmZB1qrjiUMp84,1080
|
|
48
|
+
megfile-4.1.3.post1.dist-info/METADATA,sha256=oI1b4MMW9GRz3mav_TZ2MSX6C8y1z1QebHkcCZcrcB0,9601
|
|
49
|
+
megfile-4.1.3.post1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
50
|
+
megfile-4.1.3.post1.dist-info/entry_points.txt,sha256=M6ZWSSv5_5_QtIpZafy3vq7WuOJ_5dSGQQnEZbByt2Q,49
|
|
51
|
+
megfile-4.1.3.post1.dist-info/top_level.txt,sha256=i3rMgdU1ZAJekAceojhA-bkm3749PzshtRmLTbeLUPQ,8
|
|
52
|
+
megfile-4.1.3.post1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
megfile
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import boto3
|
|
5
|
-
from iopath.common.file_io import PathManager
|
|
6
|
-
from iopath.common.s3 import S3PathHandler
|
|
7
|
-
|
|
8
|
-
times = 10240
|
|
9
|
-
s3_path = "s3://bucketA/large.txt"
|
|
10
|
-
|
|
11
|
-
start = time.time()
|
|
12
|
-
|
|
13
|
-
path_manager = PathManager()
|
|
14
|
-
|
|
15
|
-
session = boto3.Session(
|
|
16
|
-
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
|
|
17
|
-
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
18
|
-
)
|
|
19
|
-
client = session.client("s3", endpoint_url=os.environ["OSS_ENDPOINT"])
|
|
20
|
-
handler = S3PathHandler()
|
|
21
|
-
handler.client = client
|
|
22
|
-
|
|
23
|
-
path_manager.register_handler(handler)
|
|
24
|
-
|
|
25
|
-
with path_manager.open(s3_path, "rb") as f:
|
|
26
|
-
for i in range(times):
|
|
27
|
-
f.read(1024 * 1024)
|
|
28
|
-
|
|
29
|
-
print(time.time() - start)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import boto3
|
|
5
|
-
from iopath.common.file_io import PathManager
|
|
6
|
-
from iopath.common.s3 import S3PathHandler
|
|
7
|
-
|
|
8
|
-
times = 10240
|
|
9
|
-
s3_path = "s3://bucketA/large.txt"
|
|
10
|
-
block = b"1" * 1024 * 1024
|
|
11
|
-
|
|
12
|
-
start = time.time()
|
|
13
|
-
|
|
14
|
-
path_manager = PathManager()
|
|
15
|
-
|
|
16
|
-
session = boto3.Session(
|
|
17
|
-
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
|
|
18
|
-
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
19
|
-
)
|
|
20
|
-
client = session.client("s3", endpoint_url=os.environ["OSS_ENDPOINT"])
|
|
21
|
-
handler = S3PathHandler()
|
|
22
|
-
handler.client = client
|
|
23
|
-
|
|
24
|
-
path_manager.register_handler(handler)
|
|
25
|
-
|
|
26
|
-
with path_manager.open(s3_path, "wb") as f:
|
|
27
|
-
for i in range(times):
|
|
28
|
-
f.write(block)
|
|
29
|
-
|
|
30
|
-
print(time.time() - start) # write 10GB 91.642
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import time
|
|
2
|
-
|
|
3
|
-
from megfile import smart_open
|
|
4
|
-
|
|
5
|
-
times = 10240
|
|
6
|
-
s3_path = "s3://bucketA/large.txt"
|
|
7
|
-
block = b"1" * 1024 * 1024
|
|
8
|
-
|
|
9
|
-
start = time.time()
|
|
10
|
-
with smart_open(s3_path, "wb") as f:
|
|
11
|
-
for i in range(times):
|
|
12
|
-
f.write(block)
|
|
13
|
-
|
|
14
|
-
print(time.time() - start)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
from pyarrow import fs
|
|
5
|
-
|
|
6
|
-
times = 10240
|
|
7
|
-
s3_path = "bucketA/large.txt"
|
|
8
|
-
|
|
9
|
-
start = time.time()
|
|
10
|
-
|
|
11
|
-
s3 = fs.S3FileSystem(endpoint_override=os.environ["OSS_ENDPOINT"])
|
|
12
|
-
|
|
13
|
-
with s3.open_input_stream(s3_path) as f:
|
|
14
|
-
for i in range(times):
|
|
15
|
-
f.read(1024 * 1024)
|
|
16
|
-
|
|
17
|
-
print(time.time() - start)
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
from pyarrow import fs
|
|
5
|
-
|
|
6
|
-
times = 10240
|
|
7
|
-
block = b"1" * 1024 * 1024
|
|
8
|
-
s3_path = "bucketA/large.txt"
|
|
9
|
-
|
|
10
|
-
start = time.time()
|
|
11
|
-
|
|
12
|
-
s3 = fs.S3FileSystem(endpoint_override=os.environ["OSS_ENDPOINT"])
|
|
13
|
-
|
|
14
|
-
with s3.open_output_stream(s3_path) as f:
|
|
15
|
-
for i in range(times):
|
|
16
|
-
f.write(block)
|
|
17
|
-
|
|
18
|
-
print(time.time() - start)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import s3fs
|
|
5
|
-
|
|
6
|
-
times = 10240
|
|
7
|
-
s3_path = "bucketA/large.txt"
|
|
8
|
-
|
|
9
|
-
start = time.time()
|
|
10
|
-
|
|
11
|
-
s3 = s3fs.S3FileSystem(
|
|
12
|
-
endpoint_url=os.environ["OSS_ENDPOINT"],
|
|
13
|
-
key=os.environ["AWS_ACCESS_KEY_ID"],
|
|
14
|
-
secret=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
with s3.open(s3_path, "rb") as f:
|
|
18
|
-
for i in range(times):
|
|
19
|
-
f.read(1024 * 1024)
|
|
20
|
-
|
|
21
|
-
print(time.time() - start)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import s3fs
|
|
5
|
-
|
|
6
|
-
times = 10240
|
|
7
|
-
block = b"1" * 1024 * 1024
|
|
8
|
-
s3_path = "bucketA/large.txt"
|
|
9
|
-
|
|
10
|
-
start = time.time()
|
|
11
|
-
|
|
12
|
-
s3 = s3fs.S3FileSystem(
|
|
13
|
-
endpoint_url=os.environ["OSS_ENDPOINT"],
|
|
14
|
-
key=os.environ["AWS_ACCESS_KEY_ID"],
|
|
15
|
-
secret=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
with s3.open(s3_path, "wb") as f:
|
|
19
|
-
for i in range(times):
|
|
20
|
-
f.write(block)
|
|
21
|
-
|
|
22
|
-
print(time.time() - start)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import boto3
|
|
5
|
-
from smart_open import open
|
|
6
|
-
|
|
7
|
-
times = 10240
|
|
8
|
-
s3_path = "s3://bucketA/large.txt"
|
|
9
|
-
|
|
10
|
-
start = time.time()
|
|
11
|
-
session = boto3.Session(
|
|
12
|
-
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
|
|
13
|
-
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
14
|
-
)
|
|
15
|
-
with open(
|
|
16
|
-
s3_path,
|
|
17
|
-
"rb",
|
|
18
|
-
transport_params={
|
|
19
|
-
"client": session.client("s3", endpoint_url=os.environ["OSS_ENDPOINT"])
|
|
20
|
-
},
|
|
21
|
-
) as f:
|
|
22
|
-
for i in range(times):
|
|
23
|
-
f.read(1024 * 1024)
|
|
24
|
-
|
|
25
|
-
print(time.time() - start)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import boto3
|
|
5
|
-
from smart_open import open
|
|
6
|
-
|
|
7
|
-
times = 10240
|
|
8
|
-
s3_path = "s3://bucketA/large.txt"
|
|
9
|
-
block = b"1" * 1024 * 1024
|
|
10
|
-
|
|
11
|
-
start = time.time()
|
|
12
|
-
session = boto3.Session(
|
|
13
|
-
aws_access_key_id=os.environ["AWS_ACCESS_KEY_ID"],
|
|
14
|
-
aws_secret_access_key=os.environ["AWS_SECRET_ACCESS_KEY"],
|
|
15
|
-
)
|
|
16
|
-
with open(
|
|
17
|
-
s3_path,
|
|
18
|
-
"wb",
|
|
19
|
-
transport_params={
|
|
20
|
-
"client": session.client("s3", endpoint_url=os.environ["OSS_ENDPOINT"])
|
|
21
|
-
},
|
|
22
|
-
) as f:
|
|
23
|
-
for i in range(times):
|
|
24
|
-
f.write(block)
|
|
25
|
-
|
|
26
|
-
print(time.time() - start)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|