This file contains 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
$ ab -n 1000 -c 200 http://192.168.11.103:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 192.168.11.103 (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains 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
$ ab -n 1000 -c 200 http://192.168.11.103:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 192.168.11.103 (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains 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
$ ab -n 1000 -c 200 http://192.168.11.103:8080/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 192.168.11.103 (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains 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
* Server | |
* Model: NEC Express5800/S70 | |
* CPU: Intel Pentium G6950 (2.8GHz) (dual core) | |
* RAM: 16GB DDR3-1333 (PC3-10600) | |
* Disk: WD1602ABYS-19B7A0 160GB SATA/300 7200rpm Cache 16MB | |
* OS: Scientific Linux 6.3 | |
* Client | |
* Model: MacBook Pro Retina, Mid 2012 | |
* CPU: 2.6 GHz Intel Core i7 |
This file contains 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
I added debug prints. | |
``` | |
static int pmain(lua_State *L) { | |
uv_loop_t *loop; | |
/*uv_timer_t gc_timer;*/ | |
struct Smain *s = (struct Smain *)lua_touserdata(L, 1); | |
char **argv = s->argv; | |
int script; | |
int flags = 0; | |
globalL = L; |
This file contains 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
(gdb) set follow-fork-mode child | |
(gdb) run tools/checkit tests/test-fs.lua | |
Starting program: /Users/hnakamur/mysrc/lev/build/lev tools/checkit tests/test-fs.lua | |
*lev core started: 47121 | |
✔ fs_sync_test: 10/10 within 2.422 ms | |
Core exited with status 0, signal 11 | |
Program exited normally. | |
(gdb) where | |
No stack. |
This file contains 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
(gdb) set follow-fork-mode child | |
(gdb) run tools/checkit tests/test-fs.lua | |
Starting program: /home/hnakamur/mysrc/lev/build/lev tools/checkit tests/test-fs.lua | |
[Thread debugging using libthread_db enabled] | |
[New process 32304] | |
[Thread debugging using libthread_db enabled] | |
process 32304 is executing new program: /home/hnakamur/mysrc/lev/build/lev | |
[Thread debugging using libthread_db enabled] | |
*lev core started: 32304 | |
✔ fs_sync_test: 10/10 within 0.239 ms |
This file contains 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
$ build/lev -g tools/checkit tests/test-fs.lua | |
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6) | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-redhat-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
This file contains 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
static int fs_open(lua_State* L) { | |
int mode; | |
uv_fs_cb cb; | |
uv_loop_t *loop = luv_get_loop(L); | |
uv_fs_t *req = alloc_fs_req(L); | |
int arg_n = lua_gettop(L); | |
int arg_i = 1; | |
const char *path = luaL_checkstring(L, arg_i++); | |
int flags = fs_checkflags(L, arg_i++); | |
if (arg_i <= arg_n && lua_isnumber(L, arg_i)) { |
This file contains 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
$ build/lev tools/checkit tests/test-fs.lua | |
*lev core started: 3842 | |
✔ fs_sync_test: 10/10 within 0.178 ms | |
Lua Stack Dump: fs_open before set_callback starting at 5 | |
1: 'LICENSE.txt' | |
2: 'r' | |
3: 438 | |
4: <function 0x419d3958> | |
5: <userdata 0x419d39d8> | |
Core exited with status 0, signal 11 |