Rename sb_rand() to sb_rand_default().

This commit is contained in:
Alexey Kopytov
2017-01-03 10:23:33 +03:00
parent 6391638744
commit 74938b7c83
4 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@
thread_id = sysbench.tid
sb_rand = sysbench.rand
sb_rand = sysbench.rand_default
sb_rand_uniq = sb_rand_uniq
sb_rnd = sysbench.rnd
sb_rand_str = sysbench.rand_str

View File

@ -149,7 +149,7 @@ static int sb_lua_db_execute(lua_State *);
static int sb_lua_db_close(lua_State *);
static int sb_lua_db_store_results(lua_State *);
static int sb_lua_db_free_results(lua_State *);
static int sb_lua_rand(lua_State *);
static int sb_lua_rand_default(lua_State *);
static int sb_lua_rand_uniq(lua_State *);
static int sb_lua_rand_uniform(lua_State *);
static int sb_lua_rand_gaussian(lua_State *);
@ -449,7 +449,7 @@ lua_State *sb_lua_new_state(const char *scriptname, int thread_id)
SB_LUA_FUNC("event_start", sb_lua_event_start);
SB_LUA_FUNC("event_stop", sb_lua_event_stop);
SB_LUA_FUNC("rand", sb_lua_rand);
SB_LUA_FUNC("rand_default", sb_lua_rand_default);
SB_LUA_FUNC("rand_uniq", sb_lua_rand_uniq);
SB_LUA_FUNC("rnd", sb_lua_rnd);
SB_LUA_FUNC("rand_str", sb_lua_rand_str);
@ -1066,14 +1066,14 @@ int sb_lua_db_free_results(lua_State *L)
return 0;
}
int sb_lua_rand(lua_State *L)
int sb_lua_rand_default(lua_State *L)
{
int a, b;
a = luaL_checknumber(L, 1);
b = luaL_checknumber(L, 2);
lua_pushnumber(L, sb_rand(a, b));
lua_pushnumber(L, sb_rand_default(a, b));
return 1;
}

View File

@ -156,7 +156,7 @@ void sb_rand_done(void)
with the --rand-type command line option
*/
int sb_rand(int a, int b)
int sb_rand_default(int a, int b)
{
return rand_func(a,b);
}

View File

@ -76,7 +76,7 @@ void sb_rand_print_help(void);
int sb_rand_init(void);
void sb_rand_done(void);
int sb_rand(int, int);
int sb_rand_default(int, int);
int sb_rand_uniform(int, int);
int sb_rand_gaussian(int, int);
int sb_rand_special(int, int);