Skip to content
Snippets Groups Projects
Commit a1d7be12 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Konstantin Osipov
Browse files

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.
parent 60c72e78
No related branches found
No related tags found
No related merge requests found
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
...
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")
vinyl.lua
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment