{"action":"created","issue":{"url":"https://api.github.com/repos/antirez/redis/issues/2552","labels_url":"https://api.github.com/repos/antirez/redis/issues/2552/labels{/name}","comments_url":"https://api.github.com/repos/antirez/redis/issues/2552/comments","events_url":"https://api.github.com/repos/antirez/redis/issues/2552/events","html_url":"https://github.com/antirez/redis/issues/2552","id":71810604,"number":2552,"title":"Unnecessary gettimeoftheday / ustime calls or mstime caching","user":{"login":"bungle","id":983257,"avatar_url":"https://avatars.githubusercontent.com/u/983257?v=3","gravatar_id":"","url":"https://api.github.com/users/bungle","html_url":"https://github.com/bungle","followers_url":"https://api.github.com/users/bungle/followers","following_url":"https://api.github.com/users/bungle/following{/other_user}","gists_url":"https://api.github.com/users/bungle/gists{/gist_id}","starred_url":"https://api.github.com/users/bungle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bungle/subscriptions","organizations_url":"https://api.github.com/users/bungle/orgs","repos_url":"https://api.github.com/users/bungle/repos","events_url":"https://api.github.com/users/bungle/events{/privacy}","received_events_url":"https://api.github.com/users/bungle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/antirez/redis/labels/more%20work%20needed","name":"more work needed","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":71,"created_at":"2015-04-29T08:17:16Z","updated_at":"2015-05-05T13:54:04Z","closed_at":null,"body":"We have one particular issue with Redis as we see huge amounts of `gettimeoftheday` calls inside Redis. One of the problem sources seems to be this:\r\nhttps://github.com/antirez/redis/blob/9b7f8b1c9b379ab842d40df4636dfbbeb6376fcb/src/redis.c#L2089-L2091\r\n\r\nIt seems the duration is mainly used for SLOWLOGs. Could this be disabled somehow? E.g.\r\n\r\nOnly call the `ustime` two times IF\r\n\r\n```C\r\nflags & REDIS_CALL_STATS\r\n```\r\n\r\nOR\r\n\r\n```C\r\nflags & REDIS_CALL_SLOWLOG && c->cmd->proc != execCommand\r\n```\r\n\r\nI think it is worth to check these and not to call `ustime` unnecessarily."},"comment":{"url":"https://api.github.com/repos/antirez/redis/issues/comments/99083959","html_url":"https://github.com/antirez/redis/issues/2552#issuecomment-99083959","issue_url":"https://api.github.com/repos/antirez/redis/issues/2552","id":99083959,"user":{"login":"charsyam","id":439301,"avatar_url":"https://avatars.githubusercontent.com/u/439301?v=3","gravatar_id":"","url":"https://api.github.com/users/charsyam","html_url":"https://github.com/charsyam","followers_url":"https://api.github.com/users/charsyam/followers","following_url":"https://api.github.com/users/charsyam/following{/other_user}","gists_url":"https://api.github.com/users/charsyam/gists{/gist_id}","starred_url":"https://api.github.com/users/charsyam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charsyam/subscriptions","organizations_url":"https://api.github.com/users/charsyam/orgs","repos_url":"https://api.github.com/users/charsyam/repos","events_url":"https://api.github.com/users/charsyam/events{/privacy}","received_events_url":"https://api.github.com/users/charsyam/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T13:54:04Z","updated_at":"2015-05-05T13:54:04Z","body":"@sparvu @antirez I checked build error(just build error)\r\nsee below patch :) Thanks. \r\nhttps://github.com/antirez/redis/pull/2564"}}