Skip to content
Snippets Groups Projects
Commit b4619452 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

memtx: refactor statistics reporting

`box.stat.memtx` is a table that contains the 'tx' function. This is
confusing because other stat entries are callable: `box.stat.net()`,
`box.stat.vinyl()`, `box.stat.sql()`.

Let's make `box.stat.memtx` callable for consistency. The function
returns a table with the only field 'tx'. Note, we can't drop
`box.stat.memtx.tx()` without breaking backward compatibility so we now
return `box.stat.memtx().tx` when it's called.

Also, let's use `info_handler` instead of pushing statistics directly to
Lua for better encapsulation.

Needed for https://github.com/tarantool/tarantool-ee/issues/143
Closes #8448

NO_DOC=updated https://github.com/tarantool/doc/issues/2801

(cherry picked from commit 89a60d82)
parent 184772e3
No related merge requests found
Loading
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