From 3033aea56fd07172912903cd69d0735b517001af Mon Sep 17 00:00:00 2001 From: Rene Schallner Date: Wed, 11 Jan 2023 23:38:03 +0100 Subject: [PATCH] added patch file, updated readme --- README.md | 4 ++-- src/deps/0001-microsecond-logging.patch | 30 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/deps/0001-microsecond-logging.patch diff --git a/README.md b/README.md index 92d2b4d..0cd3957 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# zap - make zig web apps great again +# zap - make zig rest apis great again -## wraps `facil.io` lib +## patches and wraps `facil.io` lib diff --git a/src/deps/0001-microsecond-logging.patch b/src/deps/0001-microsecond-logging.patch new file mode 100644 index 0000000..3a6fbe4 --- /dev/null +++ b/src/deps/0001-microsecond-logging.patch @@ -0,0 +1,30 @@ +From 16e68143a9e092ea212f26de46f6a807a7024587 Mon Sep 17 00:00:00 2001 +From: Rene Schallner +Date: Wed, 11 Jan 2023 23:25:36 +0100 +Subject: [PATCH] microsecond logging + +--- + lib/facil/http/http.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/facil/http/http.c b/lib/facil/http/http.c +index d1027ffe..80ce938c 100644 +--- a/lib/facil/http/http.c ++++ b/lib/facil/http/http.c +@@ -2072,10 +2072,10 @@ void http_write_log(http_s *h) { + fiobj_str_write(l, " -- ", 4); + } + +- bytes_sent = ((end.tv_sec - start.tv_sec) * 1000) + +- ((end.tv_nsec - start.tv_nsec) / 1000000); ++ bytes_sent = ((end.tv_sec - start.tv_sec) * 1000000) + ++ ((end.tv_nsec - start.tv_nsec) / 1000); + fiobj_str_write_i(l, bytes_sent); +- fiobj_str_write(l, "ms\r\n", 4); ++ fiobj_str_write(l, "us\r\n", 4); + + buff = fiobj_obj2cstr(l); + fwrite(buff.data, 1, buff.len, stderr); +-- +2.36.2 +