add skynet.stat() to get cpu cost and message count

This commit is contained in:
Cloud Wu
2016-10-26 17:43:52 +08:00
parent 07a1499886
commit 249ffb9362
10 changed files with 104 additions and 27 deletions

View File

@@ -26,7 +26,6 @@ optint(const char *key, int opt) {
return strtol(str, NULL, 10);
}
/*
static int
optboolean(const char *key, int opt) {
const char * str = skynet_getenv(key);
@@ -36,7 +35,6 @@ optboolean(const char *key, int opt) {
}
return strcmp(str,"true")==0;
}
*/
static const char *
optstring(const char *key,const char * opt) {
@@ -137,6 +135,7 @@ main(int argc, char *argv[]) {
config.daemon = optstring("daemon", NULL);
config.logger = optstring("logger", NULL);
config.logservice = optstring("logservice", "logger");
config.profile = optboolean("profile", 1);
lua_close(L);