-
Notifications
You must be signed in to change notification settings - Fork 26
instance: total memory metric #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patapenka-alexey
merged 1 commit into
master
from
patapenka-alexey/tntp-4363-instance-memory
Sep 23, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
280908 (tarantool) R 12484 280908 12484 34819 280908 4194304 101 0 0 0 222 111 0 0 20 0 1 0 50085946 8679424 448 18446744073709551615 110672370106368 110672370123953 140731302033040 0 0 0 0 0 0 0 0 0 17 9 0 0 0 0 0 110672370137744 110672370139240 110673314615296 140731302035060 140731302035080 140731302035080 140731302039531 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env tarantool | ||
|
||
local t = require('luatest') | ||
local g = t.group('instance_metric') | ||
local utils = require('test.utils') | ||
|
||
g.before_all(function(cg) | ||
utils.create_server(cg) | ||
cg.server:exec(function() | ||
box.cfg{} | ||
local space = box.schema.space.create( | ||
'test_space', | ||
{if_not_exists = true, engine = 'vinyl'}) | ||
space:create_index('pk', {if_not_exists = true}) | ||
end) | ||
end) | ||
|
||
g.after_all(utils.drop_server) | ||
|
||
g.after_each(function(cg) | ||
cg.server:exec(function() | ||
require('metrics').clear() | ||
end) | ||
end) | ||
|
||
g.test_instance_metrics = function(cg) | ||
cg.server:exec(function() | ||
local metrics = require('metrics') | ||
local memory = require('metrics.tarantool.memory') | ||
local utils = require('test.utils') -- luacheck: ignore 431 | ||
|
||
metrics.enable_default_metrics() | ||
memory.update() | ||
local default_metrics = metrics.collect{invoke_callbacks = true} | ||
|
||
local memory_metric = utils.find_metric('tnt_memory', default_metrics) | ||
t.assert(memory_metric) | ||
t.assert_gt(memory_metric[1].value, 0) | ||
end) | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.