Skip to content

Commit

Permalink
benchmarks: v5.4.0
Browse files Browse the repository at this point in the history
add `template` benchmark
add relative complex MiniJinja template for benchmark

[skip ci]
  • Loading branch information
jqnatividad committed Nov 5, 2024
1 parent 8c07c21 commit cd7e480
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
arg_pat="$1"

# the version of this script
bm_version=5.3.2
bm_version=5.4.0

# CONFIGURABLE VARIABLES ---------------------------------------
# change as needed to reflect your environment/workloads
Expand Down Expand Up @@ -653,6 +653,7 @@ run --index stats_everything_index_j1 "$qsv_bin" stats "$data" --force --everyth
run --index stats_everything_index_j1_with_cache "$qsv_bin" stats "$data" --everything -j 1
run --index stats_everything_sorted_index "$qsv_bin" stats data_sorted.csv --force --everything
run table "$qsv_bin" table "$data"
run template "$qsv_bin" template --template-file template.tpl "$data"
run to_xlsx "$qsv_bin" to xlsx benchmark_work.xlsx "$data"
run to_sqlite "$qsv_bin" to sqlite benchmark_work.db "$data"
run to_datapackage "$qsv_bin" to datapackage benchmark_work.json "$data"
Expand Down
30 changes: 30 additions & 0 deletions scripts/template.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Incident Report #{{Unique_Key}}

Created: {{Created_Date}}
{% if Closed_Date %}Closed: {{Closed_Date}}{% endif %}
Status: {{Status}}

Agency: {{Agency}} ({{Agency_Name}})
Complaint: {{Complaint_Type}}
Description: {{Descriptor}}

Location Details:
{% if Location_Type %}Type: {{Location_Type}}{% endif %}
{% if Incident_Address %}Address: {{Incident_Address}}{% endif %}
{% if Street_Name %}Street: {{Street_Name}}{% endif %}
{% if Cross_Street_1 and Cross_Street_2 %}Between: {{Cross_Street_1}} and {{Cross_Street_2}}{% endif %}
{% if City %}City: {{City}}{% endif %}
Borough: {{Borough}}
{% if Incident_Zip %}ZIP: {{Incident_Zip}}{% endif %}
{% if Latitude and Longitude %}Coordinates: {{Latitude}}, {{Longitude}}{% endif %}

{% if Resolution_Description %}
Resolution:
{{Resolution_Description}}
{% endif %}

{% if Community_Board %}Community Board: {{Community_Board}}{% endif %}
Channel: {{Open_Data_Channel_Type}}

-----------------------------------------------------------------------

0 comments on commit cd7e480

Please sign in to comment.