Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov.dev@gmail.com>
To: kostja@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [PATCH 2/2] Rename index.info to index.stat
Date: Thu, 31 May 2018 20:13:47 +0300	[thread overview]
Message-ID: <c92746dd5f526421b44ef7dc72d4bb7db48b1b76.1527786650.git.vdavydov.dev@gmail.com> (raw)
In-Reply-To: <cover.1527786650.git.vdavydov.dev@gmail.com>
In-Reply-To: <cover.1527786650.git.vdavydov.dev@gmail.com>

index.info() is about statistics so let's rename it to index.stat().
Since index.info() is not documented, we don't need to leave the old
alias.

Follow-up #3277
---
 src/box/index.cc                    |  6 +++---
 src/box/index.h                     | 14 +++++++-------
 src/box/lua/index.c                 |  6 +++---
 src/box/lua/schema.lua              |  4 ++--
 src/box/memtx_bitset.c              |  2 +-
 src/box/memtx_hash.c                |  2 +-
 src/box/memtx_rtree.c               |  2 +-
 src/box/memtx_tree.c                |  2 +-
 src/box/sysview_index.c             |  2 +-
 src/box/vinyl.c                     |  4 ++--
 test/vinyl/bloom.result             | 12 ++++++------
 test/vinyl/bloom.test.lua           | 12 ++++++------
 test/vinyl/cache.result             | 14 +++++++-------
 test/vinyl/cache.test.lua           | 14 +++++++-------
 test/vinyl/compact.result           |  6 +++---
 test/vinyl/compact.test.lua         |  6 +++---
 test/vinyl/ddl.result               | 20 ++++++++++----------
 test/vinyl/ddl.test.lua             | 20 ++++++++++----------
 test/vinyl/errinj_gc.result         |  2 +-
 test/vinyl/errinj_gc.test.lua       |  2 +-
 test/vinyl/gc.result                |  6 +++---
 test/vinyl/gc.test.lua              |  6 +++---
 test/vinyl/info.result              | 22 +++++++++++-----------
 test/vinyl/info.test.lua            | 22 +++++++++++-----------
 test/vinyl/misc.result              | 14 +++++++-------
 test/vinyl/misc.test.lua            | 14 +++++++-------
 test/vinyl/quota_timeout.result     |  6 +++---
 test/vinyl/quota_timeout.test.lua   |  6 +++---
 test/vinyl/recover.result           |  8 ++++----
 test/vinyl/recover.test.lua         |  8 ++++----
 test/vinyl/recovery_quota.result    |  6 +++---
 test/vinyl/recovery_quota.test.lua  |  6 +++---
 test/vinyl/split_coalesce.result    |  4 ++--
 test/vinyl/split_coalesce.test.lua  |  4 ++--
 test/vinyl/update_optimize.result   | 20 ++++++++++----------
 test/vinyl/update_optimize.test.lua | 20 ++++++++++----------
 test/vinyl/upgrade/fill.lua         |  2 +-
 test/vinyl/upsert.result            | 24 ++++++++++++------------
 test/vinyl/upsert.test.lua          | 24 ++++++++++++------------
 test/vinyl/write_iterator.result    | 20 ++++++++++----------
 test/vinyl/write_iterator.test.lua  | 20 ++++++++++----------
 41 files changed, 207 insertions(+), 207 deletions(-)

diff --git a/src/box/index.cc b/src/box/index.cc
index 3c62ec1c..e326c4e7 100644
--- a/src/box/index.cc
+++ b/src/box/index.cc
@@ -413,14 +413,14 @@ box_iterator_free(box_iterator_t *it)
 /* {{{ Other index functions */
 
 int
-box_index_info(uint32_t space_id, uint32_t index_id,
+box_index_stat(uint32_t space_id, uint32_t index_id,
 	       struct info_handler *info)
 {
 	struct space *space;
 	struct index *index;
 	if (check_index(space_id, index_id, &space, &index) != 0)
 		return -1;
-	index_info(index, info);
+	index_stat(index, info);
 	return 0;
 }
 
@@ -675,7 +675,7 @@ generic_index_create_snapshot_iterator(struct index *index)
 }
 
 void
-generic_index_info(struct index *index, struct info_handler *handler)
+generic_index_stat(struct index *index, struct info_handler *handler)
 {
 	(void)index;
 	info_begin(handler);
diff --git a/src/box/index.h b/src/box/index.h
index 3bc41239..fa4060fa 100644
--- a/src/box/index.h
+++ b/src/box/index.h
@@ -212,7 +212,7 @@ box_tuple_extract_key(const box_tuple_t *tuple, uint32_t space_id,
 /** \endcond public */
 
 /**
- * Index introspection (index:info())
+ * Index statistics (index:stat())
  *
  * \param space_id space identifier
  * \param index_id index identifier
@@ -221,7 +221,7 @@ box_tuple_extract_key(const box_tuple_t *tuple, uint32_t space_id,
  * \retval >=0 on success
  */
 int
-box_index_info(uint32_t space_id, uint32_t index_id,
+box_index_stat(uint32_t space_id, uint32_t index_id,
 	       struct info_handler *info);
 
 /**
@@ -424,8 +424,8 @@ struct index_vtab {
 	 * Must be destroyed by iterator_delete() after usage.
 	 */
 	struct snapshot_iterator *(*create_snapshot_iterator)(struct index *);
-	/** Introspection (index:info()) */
-	void (*info)(struct index *, struct info_handler *);
+	/** Introspection (index:stat()) */
+	void (*stat)(struct index *, struct info_handler *);
 	/**
 	 * Trigger asynchronous index compaction. What exactly
 	 * is implied under 'compaction' depends on the engine.
@@ -617,9 +617,9 @@ index_create_snapshot_iterator(struct index *index)
 }
 
 static inline void
-index_info(struct index *index, struct info_handler *handler)
+index_stat(struct index *index, struct info_handler *handler)
 {
-	index->vtab->info(index, handler);
+	index->vtab->stat(index, handler);
 }
 
 static inline void
@@ -677,7 +677,7 @@ int generic_index_get(struct index *, const char *, uint32_t, struct tuple **);
 int generic_index_replace(struct index *, struct tuple *, struct tuple *,
 			  enum dup_replace_mode, struct tuple **);
 struct snapshot_iterator *generic_index_create_snapshot_iterator(struct index *);
-void generic_index_info(struct index *, struct info_handler *);
+void generic_index_stat(struct index *, struct info_handler *);
 void generic_index_compact(struct index *);
 void generic_index_reset_stat(struct index *);
 void generic_index_begin_build(struct index *);
diff --git a/src/box/lua/index.c b/src/box/lua/index.c
index 5b212f0b..ef89c397 100644
--- a/src/box/lua/index.c
+++ b/src/box/lua/index.c
@@ -299,7 +299,7 @@ lbox_truncate(struct lua_State *L)
 /* {{{ Introspection */
 
 static int
-lbox_index_info(lua_State *L)
+lbox_index_stat(lua_State *L)
 {
 	if (lua_gettop(L) != 2 || !lua_isnumber(L, 1) || !lua_isnumber(L, 2))
 		return luaL_error(L, "usage index.info(space_id, index_id)");
@@ -309,7 +309,7 @@ lbox_index_info(lua_State *L)
 
 	struct info_handler info;
 	luaT_info_handler_create(&info, L);
-	if (box_index_info(space_id, index_id, &info) != 0)
+	if (box_index_stat(space_id, index_id, &info) != 0)
 		return luaT_error(L);
 	return 1;
 }
@@ -363,7 +363,7 @@ box_lua_index_init(struct lua_State *L)
 		{"iterator", lbox_index_iterator},
 		{"iterator_next", lbox_iterator_next},
 		{"truncate", lbox_truncate},
-		{"info", lbox_index_info},
+		{"stat", lbox_index_stat},
 		{"compact", lbox_index_compact},
 		{NULL, NULL}
 	};
diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua
index 552d4651..0b7849fa 100644
--- a/src/box/lua/schema.lua
+++ b/src/box/lua/schema.lua
@@ -1284,8 +1284,8 @@ base_index_mt.delete = function(index, key)
     return internal.delete(index.space_id, index.id, keify(key));
 end
 
-base_index_mt.info = function(index)
-    return internal.info(index.space_id, index.id);
+base_index_mt.stat = function(index)
+    return internal.stat(index.space_id, index.id);
 end
 
 base_index_mt.compact = function(index)
diff --git a/src/box/memtx_bitset.c b/src/box/memtx_bitset.c
index e2252169..75fa5d53 100644
--- a/src/box/memtx_bitset.c
+++ b/src/box/memtx_bitset.c
@@ -475,7 +475,7 @@ static const struct index_vtab memtx_bitset_index_vtab = {
 	/* .create_iterator = */ memtx_bitset_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		generic_index_create_snapshot_iterator,
-	/* .info = */ generic_index_info,
+	/* .stat = */ generic_index_stat,
 	/* .compact = */ generic_index_compact,
 	/* .reset_stat = */ generic_index_reset_stat,
 	/* .begin_build = */ generic_index_begin_build,
diff --git a/src/box/memtx_hash.c b/src/box/memtx_hash.c
index b91d604e..eae07e8a 100644
--- a/src/box/memtx_hash.c
+++ b/src/box/memtx_hash.c
@@ -439,7 +439,7 @@ static const struct index_vtab memtx_hash_index_vtab = {
 	/* .create_iterator = */ memtx_hash_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		memtx_hash_index_create_snapshot_iterator,
-	/* .info = */ generic_index_info,
+	/* .stat = */ generic_index_stat,
 	/* .compact = */ generic_index_compact,
 	/* .reset_stat = */ generic_index_reset_stat,
 	/* .begin_build = */ generic_index_begin_build,
diff --git a/src/box/memtx_rtree.c b/src/box/memtx_rtree.c
index d751a9d8..0b12cdac 100644
--- a/src/box/memtx_rtree.c
+++ b/src/box/memtx_rtree.c
@@ -319,7 +319,7 @@ static const struct index_vtab memtx_rtree_index_vtab = {
 	/* .create_iterator = */ memtx_rtree_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		generic_index_create_snapshot_iterator,
-	/* .info = */ generic_index_info,
+	/* .stat = */ generic_index_stat,
 	/* .compact = */ generic_index_compact,
 	/* .reset_stat = */ generic_index_reset_stat,
 	/* .begin_build = */ generic_index_begin_build,
diff --git a/src/box/memtx_tree.c b/src/box/memtx_tree.c
index e4b1cd65..f851fb86 100644
--- a/src/box/memtx_tree.c
+++ b/src/box/memtx_tree.c
@@ -674,7 +674,7 @@ static const struct index_vtab memtx_tree_index_vtab = {
 	/* .create_iterator = */ memtx_tree_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		memtx_tree_index_create_snapshot_iterator,
-	/* .info = */ generic_index_info,
+	/* .stat = */ generic_index_stat,
 	/* .compact = */ generic_index_compact,
 	/* .reset_stat = */ generic_index_reset_stat,
 	/* .begin_build = */ memtx_tree_index_begin_build,
diff --git a/src/box/sysview_index.c b/src/box/sysview_index.c
index 43b30d48..51bd63ac 100644
--- a/src/box/sysview_index.c
+++ b/src/box/sysview_index.c
@@ -189,7 +189,7 @@ static const struct index_vtab sysview_index_vtab = {
 	/* .create_iterator = */ sysview_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		generic_index_create_snapshot_iterator,
-	/* .info = */ generic_index_info,
+	/* .stat = */ generic_index_stat,
 	/* .compact = */ generic_index_compact,
 	/* .reset_stat = */ generic_index_reset_stat,
 	/* .begin_build = */ generic_index_begin_build,
diff --git a/src/box/vinyl.c b/src/box/vinyl.c
index 390a1f66..026e0ad0 100644
--- a/src/box/vinyl.c
+++ b/src/box/vinyl.c
@@ -396,7 +396,7 @@ vy_info_append_compact_stat(struct info_handler *h, const char *name,
 }
 
 static void
-vinyl_index_info(struct index *index, struct info_handler *h)
+vinyl_index_stat(struct index *index, struct info_handler *h)
 {
 	char buf[1024];
 	struct vy_lsm *lsm = vy_lsm(index);
@@ -4091,7 +4091,7 @@ static const struct index_vtab vinyl_index_vtab = {
 	/* .create_iterator = */ vinyl_index_create_iterator,
 	/* .create_snapshot_iterator = */
 		generic_index_create_snapshot_iterator,
-	/* .info = */ vinyl_index_info,
+	/* .stat = */ vinyl_index_stat,
 	/* .compact = */ vinyl_index_compact,
 	/* .reset_stat = */ vinyl_index_reset_stat,
 	/* .begin_build = */ generic_index_begin_build,
diff --git a/test/vinyl/bloom.result b/test/vinyl/bloom.result
index 841a181d..a1f9aa99 100644
--- a/test/vinyl/bloom.result
+++ b/test/vinyl/bloom.result
@@ -20,7 +20,7 @@ box.snapshot()
 for i = 1, 10 do s:get{i} end
 ---
 ...
-stat = s.index.pk:info()
+stat = s.index.pk:stat()
 ---
 ...
 stat.disk.bloom_size -- 0
@@ -51,7 +51,7 @@ _ = s:create_index('pk', {parts = {1, 'unsigned', 2, 'unsigned', 3, 'unsigned',
 reflects = 0
 ---
 ...
-function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
+function cur_reflects() return box.space.test.index.pk:stat().disk.iterator.bloom.hit end
 ---
 ...
 function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
@@ -60,7 +60,7 @@ function new_reflects() local o = reflects reflects = cur_reflects() return refl
 seeks = 0
 ---
 ...
-function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
+function cur_seeks() return box.space.test.index.pk:stat().disk.iterator.lookup end
 ---
 ...
 function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
@@ -87,7 +87,7 @@ box.snapshot()
 -- or 1172 bytes, and after rounding up to the block size (128 byte)
 -- we have 1280 bytes plus the header overhead.
 --
-s.index.pk:info().disk.bloom_size
+s.index.pk:stat().disk.bloom_size
 ---
 - 1303
 ...
@@ -198,7 +198,7 @@ s = box.space.test
 reflects = 0
 ---
 ...
-function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
+function cur_reflects() return box.space.test.index.pk:stat().disk.iterator.bloom.hit end
 ---
 ...
 function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
@@ -207,7 +207,7 @@ function new_reflects() local o = reflects reflects = cur_reflects() return refl
 seeks = 0
 ---
 ...
-function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
+function cur_seeks() return box.space.test.index.pk:stat().disk.iterator.lookup end
 ---
 ...
 function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
diff --git a/test/vinyl/bloom.test.lua b/test/vinyl/bloom.test.lua
index 3f80f205..9fa789f0 100644
--- a/test/vinyl/bloom.test.lua
+++ b/test/vinyl/bloom.test.lua
@@ -8,7 +8,7 @@ _ = s:create_index('pk', {bloom_fpr = 1})
 for i = 1, 10, 2 do s:insert{i} end
 box.snapshot()
 for i = 1, 10 do s:get{i} end
-stat = s.index.pk:info()
+stat = s.index.pk:stat()
 stat.disk.bloom_size -- 0
 stat.disk.iterator.bloom.hit -- 0
 stat.disk.iterator.bloom.miss -- 0
@@ -21,10 +21,10 @@ s = box.schema.space.create('test', {engine = 'vinyl'})
 _ = s:create_index('pk', {parts = {1, 'unsigned', 2, 'unsigned', 3, 'unsigned', 4, 'unsigned'}})
 
 reflects = 0
-function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
+function cur_reflects() return box.space.test.index.pk:stat().disk.iterator.bloom.hit end
 function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
 seeks = 0
-function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
+function cur_seeks() return box.space.test.index.pk:stat().disk.iterator.lookup end
 function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
 
 for i = 1, 1000 do s:replace{math.ceil(i / 10), math.ceil(i / 2), i, i * 2} end
@@ -44,7 +44,7 @@ box.snapshot()
 -- or 1172 bytes, and after rounding up to the block size (128 byte)
 -- we have 1280 bytes plus the header overhead.
 --
-s.index.pk:info().disk.bloom_size
+s.index.pk:stat().disk.bloom_size
 
 _ = new_reflects()
 _ = new_seeks()
@@ -89,10 +89,10 @@ box.cfg{vinyl_cache = 0}
 s = box.space.test
 
 reflects = 0
-function cur_reflects() return box.space.test.index.pk:info().disk.iterator.bloom.hit end
+function cur_reflects() return box.space.test.index.pk:stat().disk.iterator.bloom.hit end
 function new_reflects() local o = reflects reflects = cur_reflects() return reflects - o end
 seeks = 0
-function cur_seeks() return box.space.test.index.pk:info().disk.iterator.lookup end
+function cur_seeks() return box.space.test.index.pk:stat().disk.iterator.lookup end
 function new_seeks() local o = seeks seeks = cur_seeks() return seeks - o end
 
 _ = new_reflects()
diff --git a/test/vinyl/cache.result b/test/vinyl/cache.result
index 108b8c1c..2043eda9 100644
--- a/test/vinyl/cache.result
+++ b/test/vinyl/cache.result
@@ -11,7 +11,7 @@ test_run:cmd("setopt delimiter ';'")
 stat = nil
 function stat_changed()
     local old_stat = stat
-    local new_stat = box.space.test.index.pk:info()
+    local new_stat = box.space.test.index.pk:stat()
     stat = new_stat
     return (old_stat == nil or
             old_stat.memory.iterator.lookup ~= new_stat.memory.iterator.lookup or
@@ -974,7 +974,7 @@ box.snapshot()
 box.begin() s:select{} box.commit()
 ---
 ...
-info = pk:info().cache
+info = pk:stat().cache
 ---
 ...
 info.lookup
@@ -985,14 +985,14 @@ info.get.rows
 ---
 - 0
 ...
-pk:info().disk.iterator.lookup
+pk:stat().disk.iterator.lookup
 ---
 - 1
 ...
 s:get{3}
 ---
 ...
-info = pk:info().cache
+info = pk:stat().cache
 ---
 ...
 info.lookup
@@ -1003,7 +1003,7 @@ info.get.rows
 ---
 - 0
 ...
-pk:info().disk.iterator.lookup
+pk:stat().disk.iterator.lookup
 ---
 - 1
 ...
@@ -1050,7 +1050,7 @@ box.stat.vinyl().cache.used
 - 0
 ...
 -- Make sure cache is not populated if box.cfg.vinyl_cache is set to 0
-st1 = s.index.pk:info().cache
+st1 = s.index.pk:stat().cache
 ---
 ...
 #s:select()
@@ -1060,7 +1060,7 @@ st1 = s.index.pk:info().cache
 for i = 1, 100 do s:get{i} end
 ---
 ...
-st2 = s.index.pk:info().cache
+st2 = s.index.pk:stat().cache
 ---
 ...
 st2.put.rows - st1.put.rows
diff --git a/test/vinyl/cache.test.lua b/test/vinyl/cache.test.lua
index b9eac75b..6f414d5d 100644
--- a/test/vinyl/cache.test.lua
+++ b/test/vinyl/cache.test.lua
@@ -6,7 +6,7 @@ test_run:cmd("setopt delimiter ';'")
 stat = nil
 function stat_changed()
     local old_stat = stat
-    local new_stat = box.space.test.index.pk:info()
+    local new_stat = box.space.test.index.pk:stat()
     stat = new_stat
     return (old_stat == nil or
             old_stat.memory.iterator.lookup ~= new_stat.memory.iterator.lookup or
@@ -346,15 +346,15 @@ s:replace{5}
 box.snapshot()
 -- Cache is not updated in autocommit mode.
 box.begin() s:select{} box.commit()
-info = pk:info().cache
+info = pk:stat().cache
 info.lookup
 info.get.rows
-pk:info().disk.iterator.lookup
+pk:stat().disk.iterator.lookup
 s:get{3}
-info = pk:info().cache
+info = pk:stat().cache
 info.lookup
 info.get.rows
-pk:info().disk.iterator.lookup
+pk:stat().disk.iterator.lookup
 s:drop()
 
 --
@@ -372,10 +372,10 @@ box.stat.vinyl().cache.used
 box.cfg{vinyl_cache = 0}
 box.stat.vinyl().cache.used
 -- Make sure cache is not populated if box.cfg.vinyl_cache is set to 0
-st1 = s.index.pk:info().cache
+st1 = s.index.pk:stat().cache
 #s:select()
 for i = 1, 100 do s:get{i} end
-st2 = s.index.pk:info().cache
+st2 = s.index.pk:stat().cache
 st2.put.rows - st1.put.rows
 box.stat.vinyl().cache.used
 s:drop()
diff --git a/test/vinyl/compact.result b/test/vinyl/compact.result
index 758f7691..a79292ee 100644
--- a/test/vinyl/compact.result
+++ b/test/vinyl/compact.result
@@ -13,7 +13,7 @@ space = box.schema.space.create("vinyl", { engine = 'vinyl' })
 _= space:create_index('primary', { parts = { 1, 'unsigned' }, run_count_per_level = 2 })
 ---
 ...
-function vyinfo() return box.space.vinyl.index.primary:info() end
+function vyinfo() return box.space.vinyl.index.primary:stat() end
 ---
 ...
 vyinfo().run_count == 0
@@ -119,14 +119,14 @@ end;
 ---
 ...
 function info()
-    local info = s.index.pk:info()
+    local info = s.index.pk:stat()
     return {range_count = info.range_count, run_count = info.run_count}
 end
 function compact()
     s.index.pk:compact()
     repeat
         fiber.sleep(0.001)
-        local info = s.index.pk:info()
+        local info = s.index.pk:stat()
     until info.range_count == info.run_count
 end;
 ---
diff --git a/test/vinyl/compact.test.lua b/test/vinyl/compact.test.lua
index b2a746aa..b9a1c109 100644
--- a/test/vinyl/compact.test.lua
+++ b/test/vinyl/compact.test.lua
@@ -5,7 +5,7 @@ digest = require('digest')
 space = box.schema.space.create("vinyl", { engine = 'vinyl' })
 _= space:create_index('primary', { parts = { 1, 'unsigned' }, run_count_per_level = 2 })
 
-function vyinfo() return box.space.vinyl.index.primary:info() end
+function vyinfo() return box.space.vinyl.index.primary:stat() end
 
 vyinfo().run_count == 0
 
@@ -54,14 +54,14 @@ function dump()
     box.snapshot()
 end;
 function info()
-    local info = s.index.pk:info()
+    local info = s.index.pk:stat()
     return {range_count = info.range_count, run_count = info.run_count}
 end
 function compact()
     s.index.pk:compact()
     repeat
         fiber.sleep(0.001)
-        local info = s.index.pk:info()
+        local info = s.index.pk:stat()
     until info.range_count == info.run_count
 end;
 test_run:cmd("setopt delimiter ''");
diff --git a/test/vinyl/ddl.result b/test/vinyl/ddl.result
index 4607a44e..3fdeea0e 100644
--- a/test/vinyl/ddl.result
+++ b/test/vinyl/ddl.result
@@ -171,7 +171,7 @@ box.snapshot()
 ---
 - ok
 ...
-while space.index.primary:info().rows ~= 0 do fiber.sleep(0.01) end
+while space.index.primary:stat().rows ~= 0 do fiber.sleep(0.01) end
 ---
 ...
 -- after a dump REPLACE + DELETE = nothing, so the space is empty now and
@@ -226,7 +226,7 @@ box.snapshot()
 ---
 - ok
 ...
-while space.index.primary:info().run_count ~= 2 do fiber.sleep(0.01) end
+while space.index.primary:stat().run_count ~= 2 do fiber.sleep(0.01) end
 ---
 ...
 -- must fail because vy_runs have data
@@ -256,7 +256,7 @@ box.snapshot()
 - ok
 ...
 -- Wait until the dump is finished.
-while space.index.primary:info().rows ~= 0 do fiber.sleep(0.01) end
+while space.index.primary:stat().rows ~= 0 do fiber.sleep(0.01) end
 ---
 ...
 index2 = space:create_index('secondary', { parts = {2, 'unsigned'} })
@@ -370,7 +370,7 @@ box.snapshot()
 ---
 - ok
 ...
-pk:info().disk.pages
+pk:stat().disk.pages
 ---
 - 4
 ...
@@ -378,7 +378,7 @@ space.index.pk.options.page_size
 ---
 - 8192
 ...
-pk:info().run_count
+pk:stat().run_count
 ---
 - 1
 ...
@@ -414,10 +414,10 @@ box.snapshot()
 - ok
 ...
 -- Wait for compaction
-while pk:info().run_count ~= 1 do fiber.sleep(0.01) end
+while pk:stat().run_count ~= 1 do fiber.sleep(0.01) end
 ---
 ...
-pk:info().disk.pages
+pk:stat().disk.pages
 ---
 - 6
 ...
@@ -425,7 +425,7 @@ space.index.pk.options.page_size
 ---
 - 16384
 ...
-pk:info().run_count
+pk:stat().run_count
 ---
 - 1
 ...
@@ -433,7 +433,7 @@ space.index.pk.options.bloom_fpr
 ---
 - 0.2
 ...
-est_bsize / page_size == pk:info().disk.pages
+est_bsize / page_size == pk:stat().disk.pages
 ---
 - true
 ...
@@ -472,7 +472,7 @@ box.snapshot()
 pk:alter({range_size = page_size * 2})
 ---
 ...
-while pk:info().range_count < 2 do space:replace{1, pad} box.snapshot() fiber.sleep(0.01) end
+while pk:stat().range_count < 2 do space:replace{1, pad} box.snapshot() fiber.sleep(0.01) end
 ---
 ...
 space:drop()
diff --git a/test/vinyl/ddl.test.lua b/test/vinyl/ddl.test.lua
index 637a331d..f1401df4 100644
--- a/test/vinyl/ddl.test.lua
+++ b/test/vinyl/ddl.test.lua
@@ -57,7 +57,7 @@ space:delete({1})
 index2 = space:create_index('secondary', { parts = {2, 'unsigned'} })
 space.index.primary:alter({parts = {1, 'unsigned', 2, 'unsigned'}})
 box.snapshot()
-while space.index.primary:info().rows ~= 0 do fiber.sleep(0.01) end
+while space.index.primary:stat().rows ~= 0 do fiber.sleep(0.01) end
 
 -- after a dump REPLACE + DELETE = nothing, so the space is empty now and
 -- can be altered.
@@ -76,7 +76,7 @@ space:insert({1, 2})
 box.snapshot()
 space:delete({1})
 box.snapshot()
-while space.index.primary:info().run_count ~= 2 do fiber.sleep(0.01) end
+while space.index.primary:stat().run_count ~= 2 do fiber.sleep(0.01) end
 -- must fail because vy_runs have data
 index2 = space:create_index('secondary', { parts = {2, 'unsigned'} })
 space.index.primary:alter({parts = {1, 'unsigned', 2, 'unsigned'}})
@@ -89,7 +89,7 @@ space:replace({2, 3})
 space:delete({2})
 box.snapshot()
 -- Wait until the dump is finished.
-while space.index.primary:info().rows ~= 0 do fiber.sleep(0.01) end
+while space.index.primary:stat().rows ~= 0 do fiber.sleep(0.01) end
 index2 = space:create_index('secondary', { parts = {2, 'unsigned'} })
 space.index.primary:alter({parts = {1, 'unsigned', 2, 'unsigned'}})
 
@@ -136,9 +136,9 @@ pad = string.rep('I', pad_size)
 for i = 1, 20 do space:replace{i, pad} end
 est_bsize = pad_size * 20
 box.snapshot()
-pk:info().disk.pages
+pk:stat().disk.pages
 space.index.pk.options.page_size
-pk:info().run_count
+pk:stat().run_count
 space.index.pk.options.bloom_fpr
 
 -- Change page_size and trigger compaction
@@ -152,12 +152,12 @@ for i = 1, 20 do space:replace{i + 20, pad} end
 est_bsize = est_bsize + pad_size * 20
 box.snapshot()
 -- Wait for compaction
-while pk:info().run_count ~= 1 do fiber.sleep(0.01) end
-pk:info().disk.pages
+while pk:stat().run_count ~= 1 do fiber.sleep(0.01) end
+pk:stat().disk.pages
 space.index.pk.options.page_size
-pk:info().run_count
+pk:stat().run_count
 space.index.pk.options.bloom_fpr
-est_bsize / page_size == pk:info().disk.pages
+est_bsize / page_size == pk:stat().disk.pages
 space:drop()
 
 --
@@ -174,7 +174,7 @@ box.snapshot()
 
 -- Decrease the range_size and dump many runs to trigger split.
 pk:alter({range_size = page_size * 2})
-while pk:info().range_count < 2 do space:replace{1, pad} box.snapshot() fiber.sleep(0.01) end
+while pk:stat().range_count < 2 do space:replace{1, pad} box.snapshot() fiber.sleep(0.01) end
 
 space:drop()
 
diff --git a/test/vinyl/errinj_gc.result b/test/vinyl/errinj_gc.result
index 704cae6e..0cbca654 100644
--- a/test/vinyl/errinj_gc.result
+++ b/test/vinyl/errinj_gc.result
@@ -53,7 +53,7 @@ s:insert{12345, 'abcdef'} box.snapshot() -- dump
 s:insert{67890, 'ghijkl'} box.snapshot() -- dump + compaction
 ---
 ...
-while s.index.pk:info().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
+while s.index.pk:stat().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
 ---
 ...
 file_count()
diff --git a/test/vinyl/errinj_gc.test.lua b/test/vinyl/errinj_gc.test.lua
index 44291091..ee590a4c 100644
--- a/test/vinyl/errinj_gc.test.lua
+++ b/test/vinyl/errinj_gc.test.lua
@@ -28,7 +28,7 @@ function gc() temp:auto_increment{} box.snapshot() end
 errinj.set('ERRINJ_VY_GC', true)
 s:insert{12345, 'abcdef'} box.snapshot() -- dump
 s:insert{67890, 'ghijkl'} box.snapshot() -- dump + compaction
-while s.index.pk:info().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
+while s.index.pk:stat().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
 file_count()
 gc()
 file_count()
diff --git a/test/vinyl/gc.result b/test/vinyl/gc.result
index bab6f31b..a012b8c1 100644
--- a/test/vinyl/gc.result
+++ b/test/vinyl/gc.result
@@ -52,7 +52,7 @@ s:insert{1} box.snapshot() -- dump
 s:insert{2} box.snapshot() -- dump + compaction
 ---
 ...
-while s.index.pk:info().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
+while s.index.pk:stat().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
 ---
 ...
 gc()
@@ -186,10 +186,10 @@ count_runs() -- 2
 for i = 1, 20 do s:replace{i, string.rep('x', 100 * 1024)} end
 ---
 ...
-while s.index.pk:info().disk.compact.count < 1 do fiber.sleep(0.001) end
+while s.index.pk:stat().disk.compact.count < 1 do fiber.sleep(0.001) end
 ---
 ...
-s.index.pk:info().disk.compact.count -- 1
+s.index.pk:stat().disk.compact.count -- 1
 ---
 - 1
 ...
diff --git a/test/vinyl/gc.test.lua b/test/vinyl/gc.test.lua
index eb56a1c6..16c0a223 100644
--- a/test/vinyl/gc.test.lua
+++ b/test/vinyl/gc.test.lua
@@ -25,7 +25,7 @@ function gc() temp:auto_increment{} box.snapshot() end
 -- Check that run files are deleted by gc.
 s:insert{1} box.snapshot() -- dump
 s:insert{2} box.snapshot() -- dump + compaction
-while s.index.pk:info().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
+while s.index.pk:stat().run_count > 1 do fiber.sleep(0.01) end -- wait for compaction
 gc()
 files = ls_data()
 #files == 2 or {files, gc_info()}
@@ -91,8 +91,8 @@ box.snapshot()
 count_runs() -- 2
 
 for i = 1, 20 do s:replace{i, string.rep('x', 100 * 1024)} end
-while s.index.pk:info().disk.compact.count < 1 do fiber.sleep(0.001) end
-s.index.pk:info().disk.compact.count -- 1
+while s.index.pk:stat().disk.compact.count < 1 do fiber.sleep(0.001) end
+s.index.pk:stat().disk.compact.count -- 1
 
 count_runs() -- 3 (compacted runs created after checkpoint are deleted)
 
diff --git a/test/vinyl/info.result b/test/vinyl/info.result
index 9ca1027a..112ba85e 100644
--- a/test/vinyl/info.result
+++ b/test/vinyl/info.result
@@ -87,7 +87,7 @@ end;
 -- Note, latency measurement is beyond the scope of this test
 -- so we just filter it out.
 function istat()
-    local st = box.space.test.index.pk:info()
+    local st = box.space.test.index.pk:stat()
     st.latency = nil
     return st
 end;
@@ -1059,10 +1059,10 @@ i1:bsize(), i2:bsize()
 for i = 1, 100, 2 do s:replace{i, i, pad()} end
 ---
 ...
-st1 = i1:info()
+st1 = i1:stat()
 ---
 ...
-st2 = i2:info()
+st2 = i2:stat()
 ---
 ...
 s:bsize()
@@ -1103,10 +1103,10 @@ box.snapshot()
 ---
 - ok
 ...
-st1 = i1:info()
+st1 = i1:stat()
 ---
 ...
-st2 = i2:info()
+st2 = i2:stat()
 ---
 ...
 s:bsize()
@@ -1149,10 +1149,10 @@ for i = 1, 100, 2 do s:delete(i) end
 for i = 2, 100, 2 do s:replace{i, i, pad()} end
 ---
 ...
-st1 = i1:info()
+st1 = i1:stat()
 ---
 ...
-st2 = i2:info()
+st2 = i2:stat()
 ---
 ...
 s:bsize()
@@ -1193,16 +1193,16 @@ box.snapshot()
 ---
 - ok
 ...
-wait(function() return i1:info() end, st1, 'disk.compact.count', 1)
+wait(function() return i1:stat() end, st1, 'disk.compact.count', 1)
 ---
 ...
-wait(function() return i2:info() end, st2, 'disk.compact.count', 1)
+wait(function() return i2:stat() end, st2, 'disk.compact.count', 1)
 ---
 ...
-st1 = i1:info()
+st1 = i1:stat()
 ---
 ...
-st2 = i2:info()
+st2 = i2:stat()
 ---
 ...
 s:bsize()
diff --git a/test/vinyl/info.test.lua b/test/vinyl/info.test.lua
index d5988c87..863a8793 100644
--- a/test/vinyl/info.test.lua
+++ b/test/vinyl/info.test.lua
@@ -70,7 +70,7 @@ end;
 -- Note, latency measurement is beyond the scope of this test
 -- so we just filter it out.
 function istat()
-    local st = box.space.test.index.pk:info()
+    local st = box.space.test.index.pk:stat()
     st.latency = nil
     return st
 end;
@@ -329,8 +329,8 @@ i1:len(), i2:len()
 i1:bsize(), i2:bsize()
 
 for i = 1, 100, 2 do s:replace{i, i, pad()} end
-st1 = i1:info()
-st2 = i2:info()
+st1 = i1:stat()
+st2 = i2:stat()
 s:bsize()
 i1:len(), i2:len()
 i1:bsize(), i2:bsize()
@@ -341,8 +341,8 @@ i1:bsize() == st1.memory.index_size
 i2:bsize() == st2.memory.index_size
 
 box.snapshot()
-st1 = i1:info()
-st2 = i2:info()
+st1 = i1:stat()
+st2 = i2:stat()
 s:bsize()
 i1:len(), i2:len()
 i1:bsize(), i2:bsize()
@@ -354,8 +354,8 @@ i2:bsize() == st2.disk.index_size + st2.disk.bloom_size + st2.disk.bytes
 
 for i = 1, 100, 2 do s:delete(i) end
 for i = 2, 100, 2 do s:replace{i, i, pad()} end
-st1 = i1:info()
-st2 = i2:info()
+st1 = i1:stat()
+st2 = i2:stat()
 s:bsize()
 i1:len(), i2:len()
 i1:bsize(), i2:bsize()
@@ -366,10 +366,10 @@ i1:bsize() == st1.memory.index_size + st1.disk.index_size + st1.disk.bloom_size
 i2:bsize() == st2.memory.index_size + st2.disk.index_size + st2.disk.bloom_size + st2.disk.bytes
 
 box.snapshot()
-wait(function() return i1:info() end, st1, 'disk.compact.count', 1)
-wait(function() return i2:info() end, st2, 'disk.compact.count', 1)
-st1 = i1:info()
-st2 = i2:info()
+wait(function() return i1:stat() end, st1, 'disk.compact.count', 1)
+wait(function() return i2:stat() end, st2, 'disk.compact.count', 1)
+st1 = i1:stat()
+st2 = i2:stat()
 s:bsize()
 i1:len(), i2:len()
 i1:bsize(), i2:bsize()
diff --git a/test/vinyl/misc.result b/test/vinyl/misc.result
index ecdcf818..409df3e0 100644
--- a/test/vinyl/misc.result
+++ b/test/vinyl/misc.result
@@ -144,31 +144,31 @@ s:insert{1, 1, 1, 1, 1, 1}
 ---
 - [1, 1, 1, 1, 1, 1]
 ...
-i1:info().lookup -- 1
+i1:stat().lookup -- 1
 ---
 - 1
 ...
-i2:info().lookup -- 0
+i2:stat().lookup -- 0
 ---
 - 0
 ...
-i3:info().lookup -- 0
+i3:stat().lookup -- 0
 ---
 - 0
 ...
-i4:info().lookup -- 1
+i4:stat().lookup -- 1
 ---
 - 1
 ...
-i5:info().lookup -- 0
+i5:stat().lookup -- 0
 ---
 - 0
 ...
-i6:info().lookup -- 0
+i6:stat().lookup -- 0
 ---
 - 0
 ...
-i7:info().lookup -- 1
+i7:stat().lookup -- 1
 ---
 - 1
 ...
diff --git a/test/vinyl/misc.test.lua b/test/vinyl/misc.test.lua
index 9442a29d..3dbfdb54 100644
--- a/test/vinyl/misc.test.lua
+++ b/test/vinyl/misc.test.lua
@@ -64,12 +64,12 @@ i7 = s:create_index('i7', {unique = true, parts = {6, 'unsigned'}})
 
 s:insert{1, 1, 1, 1, 1, 1}
 
-i1:info().lookup -- 1
-i2:info().lookup -- 0
-i3:info().lookup -- 0
-i4:info().lookup -- 1
-i5:info().lookup -- 0
-i6:info().lookup -- 0
-i7:info().lookup -- 1
+i1:stat().lookup -- 1
+i2:stat().lookup -- 0
+i3:stat().lookup -- 0
+i4:stat().lookup -- 1
+i5:stat().lookup -- 0
+i6:stat().lookup -- 0
+i7:stat().lookup -- 1
 
 s:drop()
diff --git a/test/vinyl/quota_timeout.result b/test/vinyl/quota_timeout.result
index b0c36c86..fd8b0196 100644
--- a/test/vinyl/quota_timeout.result
+++ b/test/vinyl/quota_timeout.result
@@ -190,7 +190,7 @@ pad = string.rep('x', 64)
 _ = s1:auto_increment{pad}
 ---
 ...
-s1.index.pk:info().memory.bytes > 0
+s1.index.pk:stat().memory.bytes > 0
 ---
 - true
 ...
@@ -200,10 +200,10 @@ pad = string.rep('x', box.cfg.vinyl_memory - string.len(pad))
 _ = s2:auto_increment{pad}
 ---
 ...
-while s1.index.pk:info().disk.dump.count == 0 do fiber.sleep(0.01) end
+while s1.index.pk:stat().disk.dump.count == 0 do fiber.sleep(0.01) end
 ---
 ...
-s1.index.pk:info().memory.bytes == 0
+s1.index.pk:stat().memory.bytes == 0
 ---
 - true
 ...
diff --git a/test/vinyl/quota_timeout.test.lua b/test/vinyl/quota_timeout.test.lua
index 14ac042f..41a864bb 100644
--- a/test/vinyl/quota_timeout.test.lua
+++ b/test/vinyl/quota_timeout.test.lua
@@ -90,13 +90,13 @@ _ = s2:create_index('pk')
 
 pad = string.rep('x', 64)
 _ = s1:auto_increment{pad}
-s1.index.pk:info().memory.bytes > 0
+s1.index.pk:stat().memory.bytes > 0
 
 pad = string.rep('x', box.cfg.vinyl_memory - string.len(pad))
 _ = s2:auto_increment{pad}
 
-while s1.index.pk:info().disk.dump.count == 0 do fiber.sleep(0.01) end
-s1.index.pk:info().memory.bytes == 0
+while s1.index.pk:stat().disk.dump.count == 0 do fiber.sleep(0.01) end
+s1.index.pk:stat().memory.bytes == 0
 
 test_run:cmd('switch default')
 test_run:cmd("stop server test")
diff --git a/test/vinyl/recover.result b/test/vinyl/recover.result
index d2813819..a6313f22 100644
--- a/test/vinyl/recover.result
+++ b/test/vinyl/recover.result
@@ -86,7 +86,7 @@ s5:insert{55}
 - [55]
 ...
 -- Remember stats before restarting the server.
-_ = var:insert{'vyinfo', s3.index.primary:info()}
+_ = var:insert{'vyinfo', s3.index.primary:stat()}
 ---
 ...
 test_run:cmd('restart server default')
@@ -163,7 +163,7 @@ s5.index.i2:select()
 vyinfo1 = var:get('vyinfo')[2]
 ---
 ...
-vyinfo2 = s3.index.primary:info()
+vyinfo2 = s3.index.primary:stat()
 ---
 ...
 vyinfo1.memory.rows == vyinfo2.memory.rows
@@ -267,7 +267,7 @@ _ = box.schema.space.create('info')
 _ = box.space.info:create_index('pk')
 ---
 ...
-_ = box.space.info:insert{1, box.space.test.index.pk:info()}
+_ = box.space.info:insert{1, box.space.test.index.pk:stat()}
 ---
 ...
 test2 = box.schema.space.create('test2', {engine = 'vinyl'})
@@ -339,7 +339,7 @@ sum
 old_info = box.space.info:get(1)[2]
 ---
 ...
-new_info = box.space.test.index.pk:info()
+new_info = box.space.test.index.pk:stat()
 ---
 ...
 new_info.disk.index_size == old_info.disk.index_size
diff --git a/test/vinyl/recover.test.lua b/test/vinyl/recover.test.lua
index c5670dd9..1ed266a1 100644
--- a/test/vinyl/recover.test.lua
+++ b/test/vinyl/recover.test.lua
@@ -40,7 +40,7 @@ s4:insert{44}
 s5:insert{55}
 
 -- Remember stats before restarting the server.
-_ = var:insert{'vyinfo', s3.index.primary:info()}
+_ = var:insert{'vyinfo', s3.index.primary:stat()}
 
 test_run:cmd('restart server default')
 
@@ -63,7 +63,7 @@ s5.index.i2:select()
 
 -- Check that stats didn't change after recovery.
 vyinfo1 = var:get('vyinfo')[2]
-vyinfo2 = s3.index.primary:info()
+vyinfo2 = s3.index.primary:stat()
 
 vyinfo1.memory.rows == vyinfo2.memory.rows
 vyinfo1.memory.bytes == vyinfo2.memory.bytes
@@ -99,7 +99,7 @@ for _, f in pairs(fio.glob(box.cfg.vinyl_dir .. '/' .. test.id .. '/0/*.index'))
 
 _ = box.schema.space.create('info')
 _ = box.space.info:create_index('pk')
-_ = box.space.info:insert{1, box.space.test.index.pk:info()}
+_ = box.space.info:insert{1, box.space.test.index.pk:stat()}
 
 test2 = box.schema.space.create('test2', {engine = 'vinyl'})
 _ = test2:create_index('pk')
@@ -124,7 +124,7 @@ sum
 
 -- Check that disk stats are restored after index rebuild (gh-3173).
 old_info = box.space.info:get(1)[2]
-new_info = box.space.test.index.pk:info()
+new_info = box.space.test.index.pk:stat()
 new_info.disk.index_size == old_info.disk.index_size
 new_info.disk.bloom_size == old_info.disk.bloom_size
 new_info.disk.rows == old_info.disk.rows
diff --git a/test/vinyl/recovery_quota.result b/test/vinyl/recovery_quota.result
index 68cd9248..323b7967 100644
--- a/test/vinyl/recovery_quota.result
+++ b/test/vinyl/recovery_quota.result
@@ -46,7 +46,7 @@ var = box.schema.space.create('var')
 _ = var:create_index('pk', {parts = {1, 'string'}})
 ---
 ...
-stat = box.space.test.index.pk:info()
+stat = box.space.test.index.pk:stat()
 ---
 ...
 _ = var:insert{'put', stat.put.rows}
@@ -65,7 +65,7 @@ stat.quota.used <= stat.quota.limit or {stat.quota.used, stat.quota.limit}
 - true
 ...
 -- Check that we did not replay statements dumped before restart.
-stat = box.space.test.index.pk:info()
+stat = box.space.test.index.pk:stat()
 ---
 ...
 var = box.space.var
@@ -119,7 +119,7 @@ fiber = require 'fiber'
 ---
 ...
 -- All memory above the limit must be dumped after recovery.
-while box.space.test.index.pk:info().disk.dump.count == 0 do fiber.sleep(0.001) end
+while box.space.test.index.pk:stat().disk.dump.count == 0 do fiber.sleep(0.001) end
 ---
 ...
 stat = box.stat.vinyl()
diff --git a/test/vinyl/recovery_quota.test.lua b/test/vinyl/recovery_quota.test.lua
index ec571a09..44e35ba6 100644
--- a/test/vinyl/recovery_quota.test.lua
+++ b/test/vinyl/recovery_quota.test.lua
@@ -21,7 +21,7 @@ for i = 1, 2 * box.cfg.vinyl_memory / pad_size do s:insert{i, pad} end
 box.error.injection.set('ERRINJ_VY_TASK_COMPLETE', true)
 var = box.schema.space.create('var')
 _ = var:create_index('pk', {parts = {1, 'string'}})
-stat = box.space.test.index.pk:info()
+stat = box.space.test.index.pk:stat()
 _ = var:insert{'put', stat.put.rows}
 _ = var:insert{'dump', stat.disk.dump.out.rows}
 test_run:cmd('restart server test with args="2097152"')
@@ -29,7 +29,7 @@ test_run:cmd('restart server test with args="2097152"')
 stat = box.stat.vinyl()
 stat.quota.used <= stat.quota.limit or {stat.quota.used, stat.quota.limit}
 -- Check that we did not replay statements dumped before restart.
-stat = box.space.test.index.pk:info()
+stat = box.space.test.index.pk:stat()
 var = box.space.var
 dump_before = var:get('dump')[2]
 dump_after = stat.disk.dump.out.rows
@@ -48,7 +48,7 @@ box.stat.vinyl().quota.used > 1024 * 1024
 test_run:cmd('restart server test with args="1048576"')
 fiber = require 'fiber'
 -- All memory above the limit must be dumped after recovery.
-while box.space.test.index.pk:info().disk.dump.count == 0 do fiber.sleep(0.001) end
+while box.space.test.index.pk:stat().disk.dump.count == 0 do fiber.sleep(0.001) end
 stat = box.stat.vinyl()
 stat.quota.used <= stat.quota.limit or {stat.quota.used, stat.quota.limit}
 _ = test_run:cmd('switch default')
diff --git a/test/vinyl/split_coalesce.result b/test/vinyl/split_coalesce.result
index 7205af81..47768afa 100644
--- a/test/vinyl/split_coalesce.result
+++ b/test/vinyl/split_coalesce.result
@@ -17,7 +17,7 @@ s = box.schema.space.create('test', {engine='vinyl'})
 _ = s:create_index('primary', {unique=true, parts={1, 'unsigned'}, page_size=256, range_size=2048, run_count_per_level=1, run_size_ratio=1000})
 ---
 ...
-function vyinfo() return box.space.test.index.primary:info() end
+function vyinfo() return box.space.test.index.primary:stat() end
 ---
 ...
 range_count = 4
@@ -99,7 +99,7 @@ key_count = var:get('key_count')[2]
 keys_per_range = var:get('keys_per_range')[2]
 ---
 ...
-function vyinfo() return box.space.test.index.primary:info() end
+function vyinfo() return box.space.test.index.primary:stat() end
 ---
 ...
 -- Check the space content.
diff --git a/test/vinyl/split_coalesce.test.lua b/test/vinyl/split_coalesce.test.lua
index adbf90b2..368c0748 100644
--- a/test/vinyl/split_coalesce.test.lua
+++ b/test/vinyl/split_coalesce.test.lua
@@ -9,7 +9,7 @@ _ = var:create_index('primary', {parts = {1, 'string'}})
 s = box.schema.space.create('test', {engine='vinyl'})
 _ = s:create_index('primary', {unique=true, parts={1, 'unsigned'}, page_size=256, range_size=2048, run_count_per_level=1, run_size_ratio=1000})
 
-function vyinfo() return box.space.test.index.primary:info() end
+function vyinfo() return box.space.test.index.primary:stat() end
 
 range_count = 4
 tuple_size = math.ceil(s.index.primary.options.page_size / 4)
@@ -56,7 +56,7 @@ iter = var:get('iter')[2]
 key_count = var:get('key_count')[2]
 keys_per_range = var:get('keys_per_range')[2]
 
-function vyinfo() return box.space.test.index.primary:info() end
+function vyinfo() return box.space.test.index.primary:stat() end
 
 -- Check the space content.
 s:count() == key_count
diff --git a/test/vinyl/update_optimize.result b/test/vinyl/update_optimize.result
index fbd42df0..7b799c32 100644
--- a/test/vinyl/update_optimize.result
+++ b/test/vinyl/update_optimize.result
@@ -16,7 +16,7 @@ index = space:create_index('primary', { run_count_per_level = 20 })
 index2 = space:create_index('secondary', { parts = {5, 'unsigned'}, run_count_per_level = 20 })
 ---
 ...
-function dumped_stmt_count() return index:info().disk.dump.out.rows + index2:info().disk.dump.out.rows end
+function dumped_stmt_count() return index:stat().disk.dump.out.rows + index2:stat().disk.dump.out.rows end
 ---
 ...
 box.snapshot()
@@ -28,10 +28,10 @@ test_run:cmd("setopt delimiter ';'")
 - true
 ...
 function wait_for_dump(index, old_count)
-	while index:info().run_count == old_count do
+	while index:stat().run_count == old_count do
 		fiber.sleep(0)
 	end
-	return index:info().run_count
+	return index:stat().run_count
 end;
 ---
 ...
@@ -39,10 +39,10 @@ test_run:cmd("setopt delimiter ''");
 ---
 - true
 ...
-index_run_count = index:info().run_count
+index_run_count = index:stat().run_count
 ---
 ...
-index2_run_count = index2:info().run_count
+index2_run_count = index2:stat().run_count
 ---
 ...
 old_stmt_count = dumped_stmt_count()
@@ -217,20 +217,20 @@ index2 = space:create_index('secondary', { parts = {4, 'unsigned', 3, 'unsigned'
 index3 = space:create_index('third', { parts = {5, 'unsigned'}, run_count_per_level = 20 })
 ---
 ...
-function dumped_stmt_count() return index:info().disk.dump.out.rows + index2:info().disk.dump.out.rows + index3:info().disk.dump.out.rows end
+function dumped_stmt_count() return index:stat().disk.dump.out.rows + index2:stat().disk.dump.out.rows + index3:stat().disk.dump.out.rows end
 ---
 ...
 box.snapshot()
 ---
 - ok
 ...
-index_run_count = index:info().run_count
+index_run_count = index:stat().run_count
 ---
 ...
-index2_run_count = index2:info().run_count
+index2_run_count = index2:stat().run_count
 ---
 ...
-index3_run_count = index3:info().run_count
+index3_run_count = index3:stat().run_count
 ---
 ...
 old_stmt_count = dumped_stmt_count()
@@ -661,7 +661,7 @@ test_run:cmd("setopt delimiter ';'")
 function lookups()
     local ret = {}
     for i = 1, #LOOKUPS_BASE do
-        local info = space.index[i - 1]:info()
+        local info = space.index[i - 1]:stat()
         table.insert(ret, info.lookup - LOOKUPS_BASE[i])
     end
     return ret
diff --git a/test/vinyl/update_optimize.test.lua b/test/vinyl/update_optimize.test.lua
index 32144172..a2a6ea0c 100644
--- a/test/vinyl/update_optimize.test.lua
+++ b/test/vinyl/update_optimize.test.lua
@@ -8,19 +8,19 @@ fiber = require('fiber')
 space = box.schema.space.create('test', { engine = 'vinyl' })
 index = space:create_index('primary', { run_count_per_level = 20 })
 index2 = space:create_index('secondary', { parts = {5, 'unsigned'}, run_count_per_level = 20 })
-function dumped_stmt_count() return index:info().disk.dump.out.rows + index2:info().disk.dump.out.rows end
+function dumped_stmt_count() return index:stat().disk.dump.out.rows + index2:stat().disk.dump.out.rows end
 box.snapshot()
 test_run:cmd("setopt delimiter ';'")
 function wait_for_dump(index, old_count)
-	while index:info().run_count == old_count do
+	while index:stat().run_count == old_count do
 		fiber.sleep(0)
 	end
-	return index:info().run_count
+	return index:stat().run_count
 end;
 test_run:cmd("setopt delimiter ''");
 
-index_run_count = index:info().run_count
-index2_run_count = index2:info().run_count
+index_run_count = index:stat().run_count
+index2_run_count = index2:stat().run_count
 old_stmt_count = dumped_stmt_count()
 space:insert({1, 2, 3, 4, 5})
 space:insert({2, 3, 4, 5, 6})
@@ -76,11 +76,11 @@ space = box.schema.space.create('test', { engine = 'vinyl' })
 index = space:create_index('primary', { parts = {2, 'unsigned'}, run_count_per_level = 20 } )
 index2 = space:create_index('secondary', { parts = {4, 'unsigned', 3, 'unsigned'}, run_count_per_level = 20 })
 index3 = space:create_index('third', { parts = {5, 'unsigned'}, run_count_per_level = 20 })
-function dumped_stmt_count() return index:info().disk.dump.out.rows + index2:info().disk.dump.out.rows + index3:info().disk.dump.out.rows end
+function dumped_stmt_count() return index:stat().disk.dump.out.rows + index2:stat().disk.dump.out.rows + index3:stat().disk.dump.out.rows end
 box.snapshot()
-index_run_count = index:info().run_count
-index2_run_count = index2:info().run_count
-index3_run_count = index3:info().run_count
+index_run_count = index:stat().run_count
+index2_run_count = index2:stat().run_count
+index3_run_count = index3:stat().run_count
 old_stmt_count = dumped_stmt_count()
 space:insert({1, 2, 3, 4, 5})
 space:insert({2, 3, 4, 5, 6})
@@ -213,7 +213,7 @@ test_run:cmd("setopt delimiter ';'")
 function lookups()
     local ret = {}
     for i = 1, #LOOKUPS_BASE do
-        local info = space.index[i - 1]:info()
+        local info = space.index[i - 1]:stat()
         table.insert(ret, info.lookup - LOOKUPS_BASE[i])
     end
     return ret
diff --git a/test/vinyl/upgrade/fill.lua b/test/vinyl/upgrade/fill.lua
index 9010a489..5271a294 100644
--- a/test/vinyl/upgrade/fill.lua
+++ b/test/vinyl/upgrade/fill.lua
@@ -119,7 +119,7 @@ for i = 1, 4 do
     end
     dump()
 end
-assert(s.index.pk:info().range_count >= 2)
+assert(s.index.pk:stat().range_count >= 2)
 
 dump_trigger:drop()
 
diff --git a/test/vinyl/upsert.result b/test/vinyl/upsert.result
index 76728024..e6c451d2 100644
--- a/test/vinyl/upsert.result
+++ b/test/vinyl/upsert.result
@@ -507,7 +507,7 @@ space = box.schema.space.create('test', { engine = 'vinyl' })
 index = space:create_index('primary')
 ---
 ...
-stat1 = index:info()
+stat1 = index:stat()
 ---
 ...
 -- separate upserts w/o on disk data
@@ -520,7 +520,7 @@ space:upsert({1, 1, 1}, {{'-', 2, 20}})
 space:upsert({1, 1, 1}, {{'=', 2, 20}})
 ---
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -551,7 +551,7 @@ space:upsert({2, 1, 1}, {{'=', 2, 20}})
 box.commit()
 ---
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -570,7 +570,7 @@ box.snapshot()
 ---
 - ok
 ...
-index:info().rows
+index:stat().rows
 ---
 - 2
 ...
@@ -581,7 +581,7 @@ space:upsert({1, 1, 1}, {{'+', 2, 10}})
 space:upsert({1, 1, 1}, {{'-', 2, 20}})
 ---
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -601,7 +601,7 @@ space:get({1})
 ---
 - [1, 10, 1]
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -616,7 +616,7 @@ space:get({2})
 ---
 - [2, 20, 1]
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -632,7 +632,7 @@ space:select({})
 - - [1, 10, 1]
   - [2, 20, 1]
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -647,7 +647,7 @@ stat1 = stat2
 for i = 0, 999 do space:upsert({3, 0, 0}, {{'+', 2, 1}}) end
 ---
 ...
-stat2 = index:info()
+stat2 = index:stat()
 ---
 ...
 upsert_stat_diff(stat2, stat1)
@@ -697,7 +697,7 @@ s:select()
 --
 -- gh-2520 use cache as a hint when applying upserts.
 --
-old_stat = s.index.test:info()
+old_stat = s.index.test:stat()
 ---
 ...
 -- insert the first upsert
@@ -715,7 +715,7 @@ s:get{100}
 - [100]
 ...
 -- a lookup in a run was done to populate the cache
-new_stat = s.index.test:info()
+new_stat = s.index.test:stat()
 ---
 ...
 upsert_stat_diff(new_stat, old_stat)
@@ -750,7 +750,7 @@ s:get{100}
 -- go no further than the latest dump to locate the latest
 -- value of the key
 --
-new_stat = s.index.test:info()
+new_stat = s.index.test:stat()
 ---
 ...
 upsert_stat_diff(new_stat, old_stat)
diff --git a/test/vinyl/upsert.test.lua b/test/vinyl/upsert.test.lua
index a16d2cf2..cb7cc81a 100644
--- a/test/vinyl/upsert.test.lua
+++ b/test/vinyl/upsert.test.lua
@@ -203,14 +203,14 @@ test_run:cmd("setopt delimiter ''");
 space = box.schema.space.create('test', { engine = 'vinyl' })
 index = space:create_index('primary')
 
-stat1 = index:info()
+stat1 = index:stat()
 
 -- separate upserts w/o on disk data
 space:upsert({1, 1, 1}, {{'+', 2, 10}})
 space:upsert({1, 1, 1}, {{'-', 2, 20}})
 space:upsert({1, 1, 1}, {{'=', 2, 20}})
 
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
@@ -223,7 +223,7 @@ space:upsert({2, 1, 1}, {{'-', 2, 20}})
 space:upsert({2, 1, 1}, {{'=', 2, 20}})
 box.commit()
 
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
@@ -231,13 +231,13 @@ stat1.rows
 
 box.snapshot()
 
-index:info().rows
+index:stat().rows
 
 -- upsert with on disk data
 space:upsert({1, 1, 1}, {{'+', 2, 10}})
 space:upsert({1, 1, 1}, {{'-', 2, 20}})
 
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
@@ -245,23 +245,23 @@ stat1.rows
 
 -- count of applied apserts
 space:get({1})
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
 space:get({2})
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
 space:select({})
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 
 -- start upsert optimizer
 for i = 0, 999 do space:upsert({3, 0, 0}, {{'+', 2, 1}}) end
-stat2 = index:info()
+stat2 = index:stat()
 upsert_stat_diff(stat2, stat1)
 stat1 = stat2
 space:get{3}
@@ -283,7 +283,7 @@ s:select()
 --
 -- gh-2520 use cache as a hint when applying upserts.
 --
-old_stat = s.index.test:info()
+old_stat = s.index.test:stat()
 -- insert the first upsert
 s:upsert({100}, {{'=', 2, 200}})
 -- force a dump, the inserted upsert is now on disk
@@ -291,7 +291,7 @@ box.snapshot()
 -- populate the cache
 s:get{100}
 -- a lookup in a run was done to populate the cache
-new_stat = s.index.test:info()
+new_stat = s.index.test:stat()
 upsert_stat_diff(new_stat, old_stat)
 new_stat.disk.iterator.lookup - old_stat.disk.iterator.lookup
 old_stat = new_stat
@@ -307,7 +307,7 @@ s:get{100}
 -- go no further than the latest dump to locate the latest
 -- value of the key
 --
-new_stat = s.index.test:info()
+new_stat = s.index.test:stat()
 upsert_stat_diff(new_stat, old_stat)
 new_stat.disk.iterator.lookup - old_stat.disk.iterator.lookup
 
diff --git a/test/vinyl/write_iterator.result b/test/vinyl/write_iterator.result
index 7876064d..c38de5d3 100644
--- a/test/vinyl/write_iterator.result
+++ b/test/vinyl/write_iterator.result
@@ -833,27 +833,27 @@ box.snapshot()
 - ok
 ...
 -- Wait for compaction.
-while pk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
+while pk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
 ---
 ...
-while sk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
+while sk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
 ---
 ...
-pk:info().disk.compact.count -- 1
+pk:stat().disk.compact.count -- 1
 ---
 - 1
 ...
-sk:info().disk.compact.count -- 1
+sk:stat().disk.compact.count -- 1
 ---
 - 1
 ...
 -- All INSERT+DELETE pairs should have been annihilated,
 -- only padding is left.
-pk:info().disk.compact.out.rows - PAD2 -- 0
+pk:stat().disk.compact.out.rows - PAD2 -- 0
 ---
 - 0
 ...
-sk:info().disk.compact.out.rows - PAD2 -- 0
+sk:stat().disk.compact.out.rows - PAD2 -- 0
 ---
 - 0
 ...
@@ -980,17 +980,17 @@ box.snapshot()
 - ok
 ...
 -- Wait for compaction.
-while pk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
+while pk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
 ---
 ...
-while sk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
+while sk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
 ---
 ...
-pk:info().disk.compact.count -- 1
+pk:stat().disk.compact.count -- 1
 ---
 - 1
 ...
-sk:info().disk.compact.count -- 1
+sk:stat().disk.compact.count -- 1
 ---
 - 1
 ...
diff --git a/test/vinyl/write_iterator.test.lua b/test/vinyl/write_iterator.test.lua
index e2e9e7de..73c90c42 100644
--- a/test/vinyl/write_iterator.test.lua
+++ b/test/vinyl/write_iterator.test.lua
@@ -352,14 +352,14 @@ s:delete{8}
 for i = 1001, 1000 + PAD2 do s:replace{i, i} end
 box.snapshot()
 -- Wait for compaction.
-while pk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
-while sk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
-pk:info().disk.compact.count -- 1
-sk:info().disk.compact.count -- 1
+while pk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
+while sk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
+pk:stat().disk.compact.count -- 1
+sk:stat().disk.compact.count -- 1
 -- All INSERT+DELETE pairs should have been annihilated,
 -- only padding is left.
-pk:info().disk.compact.out.rows - PAD2 -- 0
-sk:info().disk.compact.out.rows - PAD2 -- 0
+pk:stat().disk.compact.out.rows - PAD2 -- 0
+sk:stat().disk.compact.out.rows - PAD2 -- 0
 pk:select(1000, {iterator = 'LE'}) -- empty
 sk:select(1000, {iterator = 'LE'}) -- empty
 s:drop()
@@ -405,10 +405,10 @@ s:delete{8}
 for i = 1001, 1000 + PAD2 do s:replace{i, i} end
 box.snapshot()
 -- Wait for compaction.
-while pk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
-while sk:info().disk.compact.count == 0 do fiber.sleep(0.001) end
-pk:info().disk.compact.count -- 1
-sk:info().disk.compact.count -- 1
+while pk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
+while sk:stat().disk.compact.count == 0 do fiber.sleep(0.001) end
+pk:stat().disk.compact.count -- 1
+sk:stat().disk.compact.count -- 1
 -- If INSERT+DELETE statements stored in the two compacted runs
 -- were annihilated we would see tuples stored in the first run.
 pk:select(1000, {iterator = 'LE'}) -- empty
-- 
2.11.0

  parent reply	other threads:[~2018-05-31 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 17:13 [PATCH 0/2] Rename vinyl info to stat Vladimir Davydov
2018-05-31 17:13 ` [PATCH 1/2] Move box.info.vinyl to box.stat.vinyl Vladimir Davydov
2018-06-01 19:08   ` Konstantin Osipov
2018-05-31 17:13 ` Vladimir Davydov [this message]
2018-06-01 19:08   ` [PATCH 2/2] Rename index.info to index.stat Konstantin Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c92746dd5f526421b44ef7dc72d4bb7db48b1b76.1527786650.git.vdavydov.dev@gmail.com \
    --to=vdavydov.dev@gmail.com \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [PATCH 2/2] Rename index.info to index.stat' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox