mirror of
https://github.com/wg/wrk
synced 2025-01-08 23:32:54 +08:00
prepare wrk 4.0.0 release
This commit is contained in:
parent
ef6a836b7d
commit
eb165ce430
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,3 +1,16 @@
|
||||
*.o
|
||||
*.a
|
||||
wrk
|
||||
|
||||
deps/luajit/src/host/buildvm
|
||||
deps/luajit/src/host/buildvm_arch.h
|
||||
deps/luajit/src/host/minilua
|
||||
deps/luajit/src/jit/vmdef.lua
|
||||
deps/luajit/src/lj_bcdef.h
|
||||
deps/luajit/src/lj_ffdef.h
|
||||
deps/luajit/src/lj_folddef.h
|
||||
deps/luajit/src/lj_libdef.h
|
||||
deps/luajit/src/lj_recdef.h
|
||||
deps/luajit/src/lj_vm.s
|
||||
deps/luajit/src/lua/
|
||||
deps/luajit/src/luajit
|
||||
|
4
CHANGES
4
CHANGES
@ -1,11 +1,11 @@
|
||||
wrk next
|
||||
wrk 4.0.0
|
||||
|
||||
* The wrk global variable is the only global defined by default.
|
||||
* wrk.init() calls the global init(), remove calls to wrk.init().
|
||||
* Add wrk.lookup(host, port) and wrk.connect(addr) functions.
|
||||
* Add setup phase that calls the global setup() for each thread.
|
||||
* Allow assignment to thread.addr to specify the server address.
|
||||
* Add thread:set(key, value), thread:get(key), and thread:stop().
|
||||
* Add thread:set(name, value), thread:get(name), and thread:stop().
|
||||
* Record latency for every request instead of random samples.
|
||||
* Latency and requests in done() are now callable, not indexable.
|
||||
* Only record timeouts when a response is actually received.
|
||||
|
@ -53,8 +53,8 @@ Setup
|
||||
representing the thread.
|
||||
|
||||
thread.addr - get or set the thread's server address
|
||||
thread:get(key) - get the value of a global in the thread's env
|
||||
thread:set(key, value) - set the value of a global in the thread's env
|
||||
thread:get(name) - get the value of a global in the thread's env
|
||||
thread:set(name, value) - set the value of a global in the thread's env
|
||||
thread:stop() - stop the thread
|
||||
|
||||
Only boolean, nil, number, and string values or tables of the same may be
|
||||
|
@ -60,7 +60,7 @@ lua_State *script_create(char *file, char *url, char **headers) {
|
||||
struct http_parser_url parts = {};
|
||||
script_parse_url(url, &parts);
|
||||
char *path = "/";
|
||||
size_t len;
|
||||
size_t len = 0;
|
||||
|
||||
if (parts.field_set & (1 << UF_PATH)) {
|
||||
path = &url[parts.field_data[UF_PATH].off];
|
||||
@ -389,9 +389,9 @@ static int script_thread_get(lua_State *L) {
|
||||
|
||||
static int script_thread_set(lua_State *L) {
|
||||
thread *t = checkthread(L);
|
||||
const char *key = lua_tostring(L, -2);
|
||||
const char *name = lua_tostring(L, -2);
|
||||
script_copy_value(L, t->L, -1);
|
||||
lua_setglobal(t->L, key);
|
||||
lua_setglobal(t->L, name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user