vinyl: report memory and disk totals in index.info
Replace the following index.info fields memory_used # size of statements in memory size # size of statements on disk count # number of statements on disk and in memory page_count # number of pages on disk with memory rows # number of statements in memory bytes # size of statements in memory disk rows # number of statements on disk bytes # size of statements on disk (unpacked) bytes_compressed # size of statements on disk (packed) pages # number of pages on disk rows # total number of all statements bytes # total size of all statements To achieve that, this patch introduces new classes that can be used for accounting statements on disk and in memory, vy_stmt_disk_counter and vy_stmt_counter, and makes vy_slice, vy_run, vy_range, and vy_index use them instead of counting rows, bytes, and pages directly. The difference between the two classes is that vy_stmt_counter only accounts rows and bytes, while vy_stmt_disk_counter also includes bytes_compressed and pages. The classes will be reused for accounting reads and writes later. Needed for #1662
Showing
- src/box/vinyl.c 67 additions, 55 deletionssrc/box/vinyl.c
- src/box/vy_mem.c 10 additions, 16 deletionssrc/box/vy_mem.c
- src/box/vy_mem.h 3 additions, 2 deletionssrc/box/vy_mem.h
- src/box/vy_run.c 25 additions, 11 deletionssrc/box/vy_run.c
- src/box/vy_run.h 4 additions, 7 deletionssrc/box/vy_run.h
- src/box/vy_stat.h 114 additions, 0 deletionssrc/box/vy_stat.h
- test/vinyl/ddl.result 5 additions, 5 deletionstest/vinyl/ddl.result
- test/vinyl/ddl.test.lua 5 additions, 5 deletionstest/vinyl/ddl.test.lua
- test/vinyl/info.result 160 additions, 64 deletionstest/vinyl/info.result
- test/vinyl/recover.result 23 additions, 5 deletionstest/vinyl/recover.result
- test/vinyl/recover.test.lua 8 additions, 7 deletionstest/vinyl/recover.test.lua
- test/vinyl/upsert.result 5 additions, 5 deletionstest/vinyl/upsert.result
- test/vinyl/upsert.test.lua 5 additions, 5 deletionstest/vinyl/upsert.test.lua
Loading
Please register or sign in to comment