-
Notifications
You must be signed in to change notification settings - Fork 388
perf: update 1mops to support memcs #11293
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
base: master
Are you sure you want to change the base?
Conversation
80225ef
to
cae7202
Compare
8a2f2d8
to
1e03950
Compare
Now it takes a new `columns' parameter describing the amount of fields in replaced tuples (the default is 1 so the behavior is not changed). NO_DOC=pref test NO_TEST=perf test NO_CHANGELOG=perf test
1e03950
to
82658f5
Compare
The new fiber creates raw tuples without need to convert lua objects to MessagePack. The option increases the test accuracy, so let's make it use the new fiber by default (if the module is available). NO_DOC=perf test NO_TEST=perf test NO_CHANGELOG=perf test
82658f5
to
bd11fae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magomed, thanks for the patches! Please see my comments.
@@ -10,6 +10,7 @@ local fiber = require('fiber') | |||
local math = require('math') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in commit " perf: update the 1mops_write test to support memcs": s/pref/perf/
@@ -247,17 +263,28 @@ if (res ~= true) then | |||
json.encode(index_config) .. ' :' .. json.encode(err)) | |||
end | |||
|
|||
-- Preallocate the test tuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous comments started from lowercase letter
} | ||
|
||
static int | ||
fiber_lua_func(struct lua_State *L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems function has nothing common with fibers, I would rename it.
local MODULEPATH = fio.pathjoin(BUILDDIR, 'perf', 'lua', | ||
'?.' .. tarantool.build.mod_format) | ||
package.cpath = MODULEPATH .. ';' .. package.cpath | ||
local module_is_available, module = pcall(require, '1mops_write_module') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/module_is_available/1mops_write_module/
s/module/1mops_write_module/
and probably it is better to rename 1mops_write_module
to something that will reflect specific of this module. may be column_write_module
?
@@ -0,0 +1,173 @@ | |||
#include <lua.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused how many low-level memcs modules we already have:
perf/lua/1mops_write_module.c
perf/lua/column_insert_module.c
perf/lua/column_scan_module.c
Do you ever plan to introduce a Lua API to memcs?
} | ||
|
||
LUA_API int | ||
luaopen_1mops_write_module(struct lua_State *L) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to ensure that 1mops_write_module.c
uses memcs API in the same way as TCS. Should we involve someone from TCS team to review?
} | ||
|
||
static bool | ||
create_base_tuples(uint32_t num_columns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused that we test engine by a limit number of datatypes. Should we parametrize a test (or probably add another one) that will test memcs by different datatypes (standard msgpack types and our extensions 1).
Footnotes
@@ -10,6 +10,7 @@ local fiber = require('fiber') | |||
local math = require('math') | |||
local json = require('json') | |||
local fio = require('fio') | |||
local tarantool = require('tarantool') | |||
|
|||
-- XXX: This benchmark should be able to work standalone without | |||
-- any provided libraries or set LUA_PATH. Add stubs for that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in commit "perf: update the 1mops_write test to support memcs": s/pref/perf/
Now it takes a new `columns' parameter describing the amount of fields in replaced tuples (the default is 1 so the behavior is not changed).
NO_DOC=pref test
NO_TEST=perf test
NO_CHANGELOG=perf test