Making pipeline consistent with the units (#1461)
This commit is contained in:
Родитель
fe4a91bfd1
Коммит
a42da599c0
|
@ -29,7 +29,7 @@ def main(folder, num_files):
|
|||
total_data_written = num_files * 20 # in GB
|
||||
speed_gbps = (total_data_written * 8) / total_time # converting GB to Gb and then calculating Gbps
|
||||
|
||||
print(json.dumps({"name": "create_10_20GB_file", "total_time": total_time, "speed": speed_gbps, "unit": "GiB/s"}))
|
||||
print(json.dumps({"name": "create_10_20GB_file", "total_time": total_time, "speed": speed_gbps / 8, "unit": "GiB/s"}))
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Create multiple 20GB files in parallel.')
|
||||
|
|
|
@ -39,7 +39,7 @@ def main(file_paths):
|
|||
total_size_gb = total_size / (1024 ** 3) # Convert bytes to GB
|
||||
speed_gbps = (total_size * 8) / (time_taken * 10**9) # Convert bytes to bits and calculate speed in Gbps
|
||||
|
||||
print(json.dumps({"name": "read_10_20GB_file", "total_time": time_taken, "speed": speed_gbps, "unit": "GiB/s"}))
|
||||
print(json.dumps({"name": "read_10_20GB_file", "total_time": time_taken, "speed": speed_gbps / 8, "unit": "GiB/s"}))
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
|
|
|
@ -30,4 +30,4 @@ total_time = t4 - t1
|
|||
read_mbps = ((bytes_read/read_time) * 8)/(1024 * 1024)
|
||||
total_mbps = ((bytes_read/total_time) * 8)/(1024 * 1024)
|
||||
|
||||
print(json.dumps({"name": "read_" + size + "GB", "open_time": open_time, "read_time": read_time, "close_time": close_time, "total_time": total_time, "read_mbps": read_mbps, "speed": total_mbps, "unit": "MiB/s"}))
|
||||
print(json.dumps({"name": "read_" + size + "GB", "open_time": open_time, "read_time": read_time, "close_time": close_time, "total_time": total_time, "read_mbps": read_mbps / 8, "speed": total_mbps / 8, "unit": "MiB/s"}))
|
|
@ -32,4 +32,4 @@ total_time = t4 - t1
|
|||
write_mbps = ((bytes_written/write_time) * 8)/(1024 * 1024)
|
||||
total_mbps = ((bytes_written/total_time) * 8)/(1024 * 1024)
|
||||
|
||||
print(json.dumps({"name": "write_" + size + "GB", "open_time": open_time, "write_time": write_time, "close_time": close_time, "total_time": total_time, "write_mbps": write_mbps, "speed": total_mbps, "unit": "MiB/s"}))
|
||||
print(json.dumps({"name": "write_" + size + "GB", "open_time": open_time, "write_time": write_time, "close_time": close_time, "total_time": total_time, "write_mbps": write_mbps / 8, "speed": total_mbps / 8, "unit": "MiB/s"}))
|
Загрузка…
Ссылка в новой задаче