From a1d7be12cfed36be10128efdf73a5344f197f06b Mon Sep 17 00:00:00 2001 From: Vladimir Davydov <vdavydov.dev@gmail.com> Date: Sat, 17 Jun 2017 14:31:27 +0300 Subject: [PATCH] Remove vinyl/info test It's useless - it only checks that certain counters are present, but doesn't give a damn about what they show. At the same time, I have to update its output every time I modify vinyl statistics, which I'm doing pretty often these days. So let's ditch it - I'll rewrite it from scratch after I'm done reworking vinyl statistics. --- test/vinyl/info.result | 485 -------------------------------------- test/vinyl/info.test.lua | 57 ----- test/vinyl/vinyl_info.lua | 1 - 3 files changed, 543 deletions(-) delete mode 100644 test/vinyl/info.result delete mode 100644 test/vinyl/info.test.lua delete mode 120000 test/vinyl/vinyl_info.lua diff --git a/test/vinyl/info.result b/test/vinyl/info.result deleted file mode 100644 index 3edea3523e..0000000000 --- a/test/vinyl/info.result +++ /dev/null @@ -1,485 +0,0 @@ -env = require('test_run') ---- -... -test_run = env.new() ---- -... -test_run:cmd('create server vinyl_info with script="vinyl/vinyl_info.lua"') ---- -- true -... -test_run:cmd("start server vinyl_info") ---- -- true -... -test_run:cmd('switch vinyl_info') ---- -- true -... -space = box.schema.space.create('test', { engine = 'vinyl' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1, 'string'} }) ---- -... -space:replace({'xxx'}) ---- -- ['xxx'] -... -space:get({'xxx'}) ---- -- ['xxx'] -... -space:select() ---- -- - ['xxx'] -... -space:delete({'xxx'}) ---- -... -test_run:cmd("setopt delimiter ';'") ---- -- true -... -for _, v in ipairs({ 'tx_latency', 'cursor_latency', - 'get_latency', 'gc_active', 'run_avg', 'run_count', - 'page_count', 'memory_used', 'run_max', 'run_histogram', - 'size', 'size_uncompressed', 'used', 'count', 'rps', - 'total', 'dumped_statements', 'bandwidth', 'avg', 'max', - 'watermark' }) do - test_run:cmd("push filter '"..v..": .*' to '"..v..": <"..v..">'") -end; ---- -... -test_run:cmd("setopt delimiter ''"); ---- -- true -... -box.snapshot() ---- -- ok -... -box_info_sort(box.info.vinyl()) ---- -- - lsn: 5 - - memory: - - limit: 536870912 - - ratio: 0% - - used: <used> - - watermark: <watermark> - - performance: - - cache: - - count: <count> - - used: <used> - - cursor: - - rps: <rps> - - total: <total> - - cursor_latency: - - avg: <avg> - - max: <max> - - cursor_ops: - - rps: <rps> - - total: <total> - - dump_bandwidth: <bandwidth> - - dump_total: <total> - - dumped_statements: <dumped_statements> - - get: - - rps: <rps> - - total: <total> - - get_latency: - - avg: <avg> - - max: <max> - - iterator: - - cache: - - bloom_reflect_count: <count> - - lookup_count: <count> - - step_count: <count> - - mem: - - bloom_reflect_count: <count> - - lookup_count: <count> - - step_count: <count> - - run: - - bloom_reflect_count: <count> - - lookup_count: <count> - - step_count: <count> - - txw: - - bloom_reflect_count: <count> - - lookup_count: <count> - - step_count: <count> - - read_view: 0 - - tx: - - rps: <rps> - - total: <total> - - tx_active: 0 - - tx_allocated: 0 - - tx_conflict: 0 - - tx_latency: - - avg: <avg> - - max: <max> - - tx_ops: - - rps: <rps> - - total: <total> - - tx_rollback: 1 - - tx_write: - - rps: <rps> - - total: <total> - - txv_allocated: 0 - - upsert_applied: - - rps: <rps> - - total: <total> - - upsert_squashed: - - rps: <rps> - - total: <total> - - write_count: <count> -... -test_run:cmd("clear filter") ---- -- true -... -space:drop() ---- -... -info = {} ---- -... -test_run:cmd("setopt delimiter ';'") ---- -- true -... -for i = 1, 16 do - local space = box.schema.space.create('i'..i, { engine='vinyl' }) - local pk = space:create_index('pk') - info[i] = box_info_sort(pk:info()) -end; ---- -... -info; ---- -- - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' - - - bloom_fpr: 0.05 - - bytes: 0 - - disk: - - bytes: 0 - - bytes_compressed: 0 - - pages: 0 - - rows: 0 - - memory: - - bytes: 0 - - rows: 0 - - page_size: 1024 - - range_count: 1 - - range_size: 65536 - - rows: 0 - - run_avg: 0 - - run_count: 0 - - run_histogram: '[0]:1' -... -for i = 1, 16 do - box.space['i'..i]:drop() -end; ---- -... -test_run:cmd("setopt delimiter ''"); ---- -- true -... -info = nil; ---- -... -space = box.schema.space.create('test', { engine = 'vinyl' }) ---- -... -index = space:create_index('primary') ---- -... -index2 = space:create_index('secondary', { parts = {2, 'unsigned'} }) ---- -... -old_count = box.info.vinyl().performance.write_count ---- -... -space:insert({1, 1}) ---- -- [1, 1] -... -space:insert({2, 2}) ---- -- [2, 2] -... -space:insert({3, 3}) ---- -- [3, 3] -... -space:insert({4, 4}) ---- -- [4, 4] -... -box.info.vinyl().performance.write_count - old_count == 8 ---- -- true -... -space:drop() ---- -... -test_run:cmd('switch default') ---- -- true -... -test_run:cmd("stop server vinyl_info") ---- -- true -... diff --git a/test/vinyl/info.test.lua b/test/vinyl/info.test.lua deleted file mode 100644 index 3ef6aefcf6..0000000000 --- a/test/vinyl/info.test.lua +++ /dev/null @@ -1,57 +0,0 @@ -env = require('test_run') -test_run = env.new() - -test_run:cmd('create server vinyl_info with script="vinyl/vinyl_info.lua"') -test_run:cmd("start server vinyl_info") -test_run:cmd('switch vinyl_info') - -space = box.schema.space.create('test', { engine = 'vinyl' }) -index = space:create_index('primary', { type = 'tree', parts = {1, 'string'} }) -space:replace({'xxx'}) -space:get({'xxx'}) -space:select() -space:delete({'xxx'}) - -test_run:cmd("setopt delimiter ';'") -for _, v in ipairs({ 'tx_latency', 'cursor_latency', - 'get_latency', 'gc_active', 'run_avg', 'run_count', - 'page_count', 'memory_used', 'run_max', 'run_histogram', - 'size', 'size_uncompressed', 'used', 'count', 'rps', - 'total', 'dumped_statements', 'bandwidth', 'avg', 'max', - 'watermark' }) do - test_run:cmd("push filter '"..v..": .*' to '"..v..": <"..v..">'") -end; -test_run:cmd("setopt delimiter ''"); -box.snapshot() -box_info_sort(box.info.vinyl()) -test_run:cmd("clear filter") - -space:drop() - -info = {} -test_run:cmd("setopt delimiter ';'") -for i = 1, 16 do - local space = box.schema.space.create('i'..i, { engine='vinyl' }) - local pk = space:create_index('pk') - info[i] = box_info_sort(pk:info()) -end; -info; -for i = 1, 16 do - box.space['i'..i]:drop() -end; -test_run:cmd("setopt delimiter ''"); -info = nil; - -space = box.schema.space.create('test', { engine = 'vinyl' }) -index = space:create_index('primary') -index2 = space:create_index('secondary', { parts = {2, 'unsigned'} }) -old_count = box.info.vinyl().performance.write_count -space:insert({1, 1}) -space:insert({2, 2}) -space:insert({3, 3}) -space:insert({4, 4}) -box.info.vinyl().performance.write_count - old_count == 8 -space:drop() - -test_run:cmd('switch default') -test_run:cmd("stop server vinyl_info") diff --git a/test/vinyl/vinyl_info.lua b/test/vinyl/vinyl_info.lua deleted file mode 120000 index deaf558696..0000000000 --- a/test/vinyl/vinyl_info.lua +++ /dev/null @@ -1 +0,0 @@ -vinyl.lua \ No newline at end of file -- GitLab