From 02608271bb2a9f3a65ed536984d306ee14b48e34 Mon Sep 17 00:00:00 2001 From: Geo Halkiadakis Date: Sun, 12 Jul 2026 15:51:52 +0300 Subject: initialize repository; add docker config; migrate configuration to new specs --- tests/compare/redis-v-filecache.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 tests/compare/redis-v-filecache.php (limited to 'tests/compare/redis-v-filecache.php') diff --git a/tests/compare/redis-v-filecache.php b/tests/compare/redis-v-filecache.php new file mode 100755 index 0000000..3cb6536 --- /dev/null +++ b/tests/compare/redis-v-filecache.php @@ -0,0 +1,35 @@ +runQuery("SELECT * FROM products LIMIT 10000",[]); + +Benchmark::add_spot('redis-set-start'); +foreach($products as $product) { + RedisCache::set('prod'.$product['ID'], $product, 600); +} + +Benchmark::add_spot('redis-get-start'); +foreach($products as $product) { + $x = RedisCache::get('prod'.$product['ID']); +} + +Benchmark::add_spot('filecache-set-start'); +foreach($products as $product) { + FileCache::set('prod'.$product['ID'], $product, 600); +} + +Benchmark::add_spot('filecache-get-start'); +foreach($products as $product) { + $x = FileCache::get('prod'.$product['ID']); +} + +Benchmark::add_spot('end'); +echo(Benchmark::report(BENCH_REPORT_COMMENT)); + +echo "test completed!"; +die(); + + -- cgit v1.2.3