From 9d18703714097ec15fae3d216aed2168584f4e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=8F=E5=B7=A8=E5=B9=BF?= Date: Wed, 2 Aug 2023 14:27:16 +0800 Subject: [PATCH] update test result --- apps/c/redis/README.md | 40 ++++++++++++++++++++-------------------- ulib/axlibc/c/time.c | 8 +++----- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/apps/c/redis/README.md b/apps/c/redis/README.md index c6fa973a1d..44093156db 100644 --- a/apps/c/redis/README.md +++ b/apps/c/redis/README.md @@ -311,24 +311,24 @@ MSET (10 keys): 54318.30 requests per second - 0801 ``` -PING_INLINE: 70274.07 requests per second -PING_BULK: 72463.77 requests per second -SET: 72674.41 requests per second -GET: 74349.44 requests per second -INCR: 74404.77 requests per second -LPUSH: 74128.98 requests per second -RPUSH: 74074.07 requests per second -LPOP: 74294.21 requests per second -RPOP: 73964.50 requests per second -SADD: 74349.44 requests per second -HSET: 74571.22 requests per second -SPOP: 74404.77 requests per second -ZADD: 74515.65 requests per second -ZPOPMIN: 74850.30 requests per second -LPUSH (needed to benchmark LRANGE): 74239.05 requests per second -LRANGE_100 (first 100 elements): 52882.07 requests per second -LRANGE_300 (first 300 elements): **** (This test has bug) -LRANGE_500 (first 450 elements): 16835.02 requests per second -LRANGE_600 (first 600 elements): 13149.24 requests per second -MSET (10 keys): 70422.54 requests per second +PING_INLINE: 71377.59 requests per second +PING_BULK: 74571.22 requests per second +SET: 75642.96 requests per second +GET: 75872.54 requests per second +INCR: 76394.20 requests per second +LPUSH: 75815.01 requests per second +RPUSH: 75930.14 requests per second +LPOP: 75528.70 requests per second +RPOP: 75585.79 requests per second +SADD: 75815.01 requests per second +HSET: 75757.57 requests per second +SPOP: 75930.14 requests per second +ZADD: 75757.57 requests per second +ZPOPMIN: 75757.57 requests per second +LPUSH (needed to benchmark LRANGE): 75471.70 requests per second +LRANGE_100 (first 100 elements): 52438.39 requests per second +LRANGE_300 (first 300 elements): 677.74 requests per second +LRANGE_500 (first 450 elements): 16485.33 requests per second +LRANGE_600 (first 600 elements): 13159.63 requests per second +MSET (10 keys): 72780.20 requests per second ``` diff --git a/ulib/axlibc/c/time.c b/ulib/axlibc/c/time.c index 8f806013ea..a6a9214468 100644 --- a/ulib/axlibc/c/time.c +++ b/ulib/axlibc/c/time.c @@ -21,12 +21,10 @@ const int HOUR_PER_DAY = 24; #define DAYS_PER_100Y (365 * 100 + 24) #define DAYS_PER_4Y (365 * 4 + 1) -// TODO: -size_t strftime(char *__restrict__ _Buf, size_t _SizeInBytes, const char *__restrict__ _Format, - const struct tm *__restrict__ _Tm) +size_t strftime(char *restrict buf, size_t size, const char *restrict format, + const struct tm *restrict timeptr) { - unimplemented(); - return 0; + return ax_strftime(buf, size, format, timeptr); } int __secs_to_tm(long long t, struct tm *tm)