Making pipeline consistent with the units (#1461)

This commit is contained in:
syeleti-msft 2024-09-06 15:37:46 +05:30 коммит произвёл GitHub
Родитель fe4a91bfd1
Коммит a42da599c0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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"}))