From 0a357446ef9cbc7f615294dc2cbe431340e5c068 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Fri, 10 May 2024 12:28:23 +0200 Subject: [PATCH] benchmark-ramdb: already taken into account in benchmark-cars. --- spec/benchmark-ramdb.cr | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 spec/benchmark-ramdb.cr diff --git a/spec/benchmark-ramdb.cr b/spec/benchmark-ramdb.cr deleted file mode 100644 index bfb48dc..0000000 --- a/spec/benchmark-ramdb.cr +++ /dev/null @@ -1,30 +0,0 @@ -require "benchmark" -require "./benchmark-utilities.cr" -require "./cars.cr" - -cars_ram = DODB::RAMOnlySpecDataBase(Car).new -cached_searchby_name, cached_searchby_color, cached_searchby_keywords = ram_indexes cars_ram -add_cars cars_ram, 1_000 - -# Searching for data with an index. -Benchmark.ips do |x| - x.report("(cars db) searching a data with an index (with a cache)") do - corvet = cached_searchby_name.get "Corvet-500" - end -end - -# Searching for data with a partition. -Benchmark.ips do |x| - x.report("(cars db) searching a data with a partition (with a cache)") do - red_cars = cached_searchby_color.get "red" - end -end - -# Searching for data with a tag. -Benchmark.ips do |x| - x.report("(cars db) searching a data with a tag (with a cache)") do - red_cars = cached_searchby_keywords.get "spacious" - end -end - -cars_ram.rm_storage_dir