Add benchmark for collection count functions

This commit is contained in:
Claudio Ortolina
2026-04-09 07:05:06 +01:00
parent 59937dadb8
commit 6a60fe1860
+14
View File
@@ -0,0 +1,14 @@
alias MusicLibrary.Collection
Logger.configure(level: :error)
Benchee.run(
%{
"count_records_by_artist(limit: 20)" => fn -> Collection.count_records_by_artist(limit: 20) end,
"count_records_by_genre(limit: 20)" => fn -> Collection.count_records_by_genre(limit: 20) end,
"count_records_by_release_year(limit: 20)" => fn -> Collection.count_records_by_release_year(limit: 20) end
},
warmup: 2,
time: 5,
memory_time: 2
)