Skip to content

Commit

Permalink
Evaluation: new time chart
Browse files Browse the repository at this point in the history
  • Loading branch information
PahegiStud committed Jun 13, 2024
1 parent dda3119 commit bfe025d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
15 changes: 9 additions & 6 deletions evaluation/results_2024/eval-results-viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,8 @@ def plot_query_by_time(test_runs, filename, title=None, queries=None, labels=Non
plt.gca().yaxis.set_major_formatter(FormatStrFormatter('%ds'))

custom_legend_labels = [
'Spatial Query + Sequential Point Filter',
'Spatial Query + Range Filter + Sequential Point Filter',
'Lidarserv: Spatial Query + Sequential Point Filter',
'Lidarserv: Spatial Query + Range Filter + Sequential Point Filter',
# 'Spatial Query + Range Filter + Histogram Filter + Sequential Point Filter',
# 'Bounds Filter',
# 'Bounds Filter\nHistogram Filter',
Expand Down Expand Up @@ -1003,12 +1003,12 @@ def plot_query_by_time_pg(lidarserv_data, pg_data, outputfile, title=None, queri
labels = query_pretty_names()
# subqueries = ["raw_spatial", "raw_point_filtering", "point_filtering_with_node_acc",
# "point_filtering_with_full_acc", "only_node_acc", "only_full_acc"]
subqueries = ["point_filtering_with_node_acc"]
subqueries = ["raw_point_filtering", "point_filtering_with_node_acc"]

bar_width = 1 / (2*len(subqueries) + 1)
index = range(len(queries))

colors = ['#F4B400', '#4285F4']
colors = ['#DB4437', '#F4B400', '#4285F4']

for run in lidarserv_data:
for p in range(len(queries)):
Expand All @@ -1019,17 +1019,19 @@ def plot_query_by_time_pg(lidarserv_data, pg_data, outputfile, title=None, queri
try:
time_subquery = [run["results"]["query_performance"][queries[p]][subquery]["query_time_seconds"]]
num_points_subquery = [run["results"]["query_performance"][queries[p]][subquery]["nr_points"]]
plt.bar([p + i * bar_width + 0.2], time_subquery, bar_width, label=subquery, color=colors[i])
plt.bar([p + i * bar_width - 0], time_subquery, bar_width, label=subquery, color=colors[i])
if subquery == "point_filtering_with_node_acc":
sum_lidarserv += num_points_subquery[0] / time_subquery[0]
except:
print("LIDARSERV: ", subquery, " not available")
pass

# PGPOINTCLOUD
if subquery == "raw_point_filtering":
continue
time_subquery = pg_data[queries[p]][subquery]["mean"]
num_points_subquery = pg_data[queries[p]][subquery]["num_points"]
plt.bar([p + (i + len(subqueries)) * bar_width + 0.2], time_subquery, bar_width, label=subquery, color=colors[i+1])
plt.bar([p + (i + 1) * bar_width - 0], time_subquery, bar_width, label=subquery, color=colors[i+1])
if subquery == "point_filtering_with_node_acc":
sum_pg += num_points_subquery / time_subquery

Expand All @@ -1044,6 +1046,7 @@ def plot_query_by_time_pg(lidarserv_data, pg_data, outputfile, title=None, queri
plt.gca().yaxis.set_major_formatter(FormatStrFormatter('%ds'))

custom_legend_labels = [
'Lidarserv: Spatial Query + Sequential Point Filter',
'Lidarserv: Spatial Query + Range Filter + Sequential Point Filter',
'pgPointCloud: Spatial Query + Range Filter + Sequential Point Filter',
] # Custom legend labels
Expand Down

0 comments on commit bfe025d

Please sign in to comment.