Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
merge benchmark branch
Browse files Browse the repository at this point in the history
  • Loading branch information
CPKevin2002 committed May 1, 2024
2 parents 1562c1e + 660437a commit d1f77f3
Show file tree
Hide file tree
Showing 12 changed files with 234 additions and 193 deletions.
46 changes: 13 additions & 33 deletions executor_logs/1.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,31 @@
[{
"query_id": 1,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:41.311162553Z",
"finished_at": "2024-04-30T04:05:41.611776291Z"
},{
"query_id": 3,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:41.615569921Z",
"finished_at": "2024-04-30T04:05:42.261947473Z"
},{
"query_id": 5,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:42.265275860Z",
"finished_at": "2024-04-30T04:05:42.657463794Z"
},{
"query_id": 6,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:42.670368080Z",
"finished_at": "2024-04-30T04:05:43.579116809Z"
"submitted_at": "2024-05-01T18:39:05.582252348Z",
"finished_at": "2024-05-01T18:39:06.165200020Z"
},{
"query_id": 8,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:43.649699465Z",
"finished_at": "2024-04-30T04:05:44.231500740Z"
"submitted_at": "2024-05-01T18:39:06.224918099Z",
"finished_at": "2024-05-01T18:39:06.619621561Z"
},{
"query_id": 10,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:44.236022772Z",
"finished_at": "2024-04-30T04:05:45.055441723Z"
"submitted_at": "2024-05-01T18:39:06.646459218Z",
"finished_at": "2024-05-01T18:39:07.023781399Z"
},{
"query_id": 13,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:45.061987477Z",
"finished_at": "2024-04-30T04:05:45.660567764Z"
},{
"query_id": 15,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:45.669795701Z",
"finished_at": "2024-04-30T04:05:46.468776022Z"
"submitted_at": "2024-05-01T18:39:07.026025850Z",
"finished_at": "2024-05-01T18:39:07.506840605Z"
},{
"query_id": 17,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:46.737257611Z",
"finished_at": "2024-04-30T04:05:47.486785476Z"
"submitted_at": "2024-05-01T18:39:07.528556808Z",
"finished_at": "2024-05-01T18:39:07.804726108Z"
},{
"query_id": 19,
"query_id": 20,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:47.495419528Z",
"finished_at": "2024-04-30T04:05:48.734815843Z"
"submitted_at": "2024-05-01T18:39:07.970636251Z",
"finished_at": "2024-05-01T18:39:08.157312105Z"
}]
51 changes: 8 additions & 43 deletions executor_logs/2.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
[{
"query_id": 0,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:40.982378431Z",
"finished_at": "2024-04-30T04:05:41.359080251Z"
},{
"query_id": 2,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:41.401419262Z",
"finished_at": "2024-04-30T04:05:42.094735714Z"
},{
"query_id": 4,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:42.103513052Z",
"finished_at": "2024-04-30T04:05:43.036092681Z"
},{
"query_id": 7,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:43.109012414Z",
"finished_at": "2024-04-30T04:05:44.102706585Z"
"submitted_at": "2024-05-01T18:39:05.563950233Z",
"finished_at": "2024-05-01T18:39:06.443812915Z"
},{
"query_id": 9,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:44.117716933Z",
"finished_at": "2024-04-30T04:05:44.589305965Z"
},{
"query_id": 11,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:44.593079833Z",
"finished_at": "2024-04-30T04:05:44.790273565Z"
"submitted_at": "2024-05-01T18:39:06.491129817Z",
"finished_at": "2024-05-01T18:39:06.875821117Z"
},{
"query_id": 12,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:44.793114918Z",
"finished_at": "2024-04-30T04:05:45.413309418Z"
},{
"query_id": 14,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:45.550280406Z",
"finished_at": "2024-04-30T04:05:45.940785517Z"
"submitted_at": "2024-05-01T18:39:06.895659316Z",
"finished_at": "2024-05-01T18:39:07.260059502Z"
},{
"query_id": 16,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:46.135095564Z",
"finished_at": "2024-04-30T04:05:47.109937944Z"
},{
"query_id": 18,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:47.123801974Z",
"finished_at": "2024-04-30T04:05:48.062610608Z"
},{
"query_id": 20,
"sql_string": "",
"submitted_at": "2024-04-30T04:05:48.116135841Z",
"finished_at": "2024-04-30T04:05:48.378793081Z"
"submitted_at": "2024-05-01T18:39:07.337608076Z",
"finished_at": "2024-05-01T18:39:08.442715800Z"
}]
16 changes: 16 additions & 0 deletions executor_logs/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[{
"query_id": 1,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:05.562733349Z",
"finished_at": "2024-05-01T18:39:05.905443055Z"
},{
"query_id": 7,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:06.081186783Z",
"finished_at": "2024-05-01T18:39:07.796374411Z"
},{
"query_id": 19,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:07.805993539Z",
"finished_at": "2024-05-01T18:39:08.611880891Z"
}]
21 changes: 21 additions & 0 deletions executor_logs/4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[{
"query_id": 0,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:05.400438587Z",
"finished_at": "2024-05-01T18:39:05.616974575Z"
},{
"query_id": 5,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:05.650031480Z",
"finished_at": "2024-05-01T18:39:05.800125237Z"
},{
"query_id": 6,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:05.813638054Z",
"finished_at": "2024-05-01T18:39:07.025301615Z"
},{
"query_id": 15,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:07.144327632Z",
"finished_at": "2024-05-01T18:39:08.252676616Z"
}]
21 changes: 21 additions & 0 deletions executor_logs/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[{
"query_id": 4,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:05.581744934Z",
"finished_at": "2024-05-01T18:39:06.692270080Z"
},{
"query_id": 11,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:06.757687531Z",
"finished_at": "2024-05-01T18:39:07.025266092Z"
},{
"query_id": 14,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:07.035600799Z",
"finished_at": "2024-05-01T18:39:07.770850561Z"
},{
"query_id": 18,
"sql_string": "",
"submitted_at": "2024-05-01T18:39:07.799594295Z",
"finished_at": "2024-05-01T18:39:08.098918047Z"
}]
20 changes: 9 additions & 11 deletions executor_timing_visualization.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import matplotlib.pyplot as plt
import pandas as pd
import os
import json
import pandas as pd
import matplotlib.pyplot as plt


def load_and_process_json_files(directory):
data = []
Expand All @@ -22,10 +21,8 @@ def load_and_process_json_files(directory):

return data, all_submitted_times


# Directory containing the JSON files
directory = "./executor_logs"

jobs_data, all_submitted_times = load_and_process_json_files(directory)

df_jobs = pd.DataFrame(jobs_data)
Expand All @@ -41,15 +38,16 @@ def load_and_process_json_files(directory):
for index in sorted(file_indices):
df_subset = df_jobs[df_jobs['file_index'] == index]
for i, row in df_subset.iterrows():
plt.plot([row['normalized_submitted'], row['normalized_finished']], [index, index], marker='o')

plt.yticks(sorted(file_indices), labels=[f"{index}" for index in sorted(file_indices)])
plt.plot([row['normalized_submitted'], row['normalized_finished']], [index, index],
marker='o', linewidth=5, markersize=5) # Thicker line and larger markers

plt.yticks(sorted(file_indices), labels=[f"Executor {index}" for index in sorted(file_indices)], fontsize=12)
plt.gca().invert_yaxis()

plt.xlabel('Time (seconds from first query submission)')
plt.ylabel('File Index')
plt.xlabel('Time (seconds from first query submission)', fontsize=14)
plt.ylabel('Executor ID', fontsize=14)
plt.title('Normalized Timeline of Executor Busy/Idle Times', fontsize=18)
plt.grid(True) # Add gridlines

plt.title('Normalized Timeline of Job Events Execution')
plt.tight_layout()
plt.show()
2 changes: 1 addition & 1 deletion executors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
id = 2
ip_addr = "0.0.0.0"
port = 65533
numa_node = 1
numa_node = 1
Loading

0 comments on commit d1f77f3

Please sign in to comment.