box: introduce space:stat()
See the doc bot request for the description. Benchmark results: NO_WRAP $ taskset 0x2 compare.py benchmarks ./memtx.perftest.old ./memtx.perftest.new \ --benchmark_min_warmup_time=10 \ --benchmark_repetitions=30 \ --benchmark_report_aggregates_only=true \ --benchmark_filter=TreeReplaceRandomExistingKeys [...] Comparing ./memtx.perftest.old to ./memtx.perftest.new Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------------------ MemtxFixture/TreeReplaceRandomExistingKeys_mean +0.0097 +0.0097 1073 1084 1073 1084 MemtxFixture/TreeReplaceRandomExistingKeys_median +0.0075 +0.0075 1062 1070 1062 1070 MemtxFixture/TreeReplaceRandomExistingKeys_stddev -0.1207 -0.1208 56 49 56 49 MemtxFixture/TreeReplaceRandomExistingKeys_cv -0.1291 -0.1292 0 0 0 0 NO_WRAP Closes #6762 @TarantoolBot document Title: Document `space:stat()` Product: Tarantool Since: 3.0 Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/ space_object:stat() - Get statistics on the memory usage Returns a table with the cumulative statistics on the memory usage by tuples in the space. The statistics is grouped by arena types: "memtx" or "malloc". For a detailed description of each field see `tuple_object:info()`. Note: The statistics is collected only for memtx storage engine. For other types of spaces, an empty table is returned. Example: ``` tarantool> box.space.test:stat() --- - tuple: memtx: data_size: 5100699 header_size: 96 field_map_size: 40 waste_size: 143093 malloc: data_size: 18850077 header_size: 70 field_map_size: 28 waste_size: 0 ... ```
Showing
- changelogs/unreleased/gh-6762-add-tuple-info-and-space-stat.md 4 additions, 0 deletions...elogs/unreleased/gh-6762-add-tuple-info-and-space-stat.md
- src/box/lua/schema.lua 1 addition, 0 deletionssrc/box/lua/schema.lua
- src/box/lua/space.cc 55 additions, 0 deletionssrc/box/lua/space.cc
- src/box/memtx_engine.cc 2 additions, 5 deletionssrc/box/memtx_engine.cc
- src/box/memtx_space.c 55 additions, 16 deletionssrc/box/memtx_space.c
- src/box/memtx_space.h 13 additions, 7 deletionssrc/box/memtx_space.h
- src/box/memtx_tx.c 7 additions, 3 deletionssrc/box/memtx_tx.c
- src/box/memtx_tx.h 1 addition, 2 deletionssrc/box/memtx_tx.h
- test/box-luatest/gh_6762_tuple_and_space_size_test.lua 100 additions, 0 deletionstest/box-luatest/gh_6762_tuple_and_space_size_test.lua
Loading
Please register or sign in to comment