{"action":"created","issue":{"url":"https://api.github.com/repos/gabime/spdlog/issues/38","labels_url":"https://api.github.com/repos/gabime/spdlog/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/gabime/spdlog/issues/38/comments","events_url":"https://api.github.com/repos/gabime/spdlog/issues/38/events","html_url":"https://github.com/gabime/spdlog/pull/38","id":55625592,"number":38,"title":"coarse clock, short log level","user":{"login":"divaykin","id":331169,"avatar_url":"https://avatars.githubusercontent.com/u/331169?v=3","gravatar_id":"","url":"https://api.github.com/users/divaykin","html_url":"https://github.com/divaykin","followers_url":"https://api.github.com/users/divaykin/followers","following_url":"https://api.github.com/users/divaykin/following{/other_user}","gists_url":"https://api.github.com/users/divaykin/gists{/gist_id}","starred_url":"https://api.github.com/users/divaykin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divaykin/subscriptions","organizations_url":"https://api.github.com/users/divaykin/orgs","repos_url":"https://api.github.com/users/divaykin/repos","events_url":"https://api.github.com/users/divaykin/events{/privacy}","received_events_url":"https://api.github.com/users/divaykin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-27T14:40:58Z","updated_at":"2015-01-27T16:31:59Z","closed_at":"2015-01-27T16:13:36Z","pull_request":{"url":"https://api.github.com/repos/gabime/spdlog/pulls/38","html_url":"https://github.com/gabime/spdlog/pull/38","diff_url":"https://github.com/gabime/spdlog/pull/38.diff","patch_url":"https://github.com/gabime/spdlog/pull/38.patch"},"body":"There are two changes here - short (one letter) level name which is to me important (less space / more efficient / better readability due to constant prefix length).\r\n\r\nAnd another is performance optimization - if SPDLOG_CLOCK_COARSE is defined than COARSE clock is used. Which makes HUGE impact.\r\n\r\nW/o COARSE (normal logging)\r\n`[denis@centosvm example]$ ./bench \r\n*******************************************************************************\r\nSingle thread, 1,048,576 iterations, auto flush=0\r\n*******************************************************************************\r\nrotating_st...\t\t895,865/sec\r\ndaily_st...\t\t790,050/sec\r\nnull_st...\t\t2,152,852/sec\r\n\r\n*******************************************************************************\r\n10 threads sharing same logger, 1,048,576 iterations, auto_flush=0\r\n*******************************************************************************\r\nrotating_mt...\t\t1,303,881/sec\r\ndaily_mt...\t\t1,112,445/sec\r\nnull_mt...\t\t2,111,470/sec\r\n\r\n*******************************************************************************\r\nasync logging.. 10 threads sharing same logger, 1,048,576 iterations, auto_flush=0\r\n*******************************************************************************\r\nas...\t\t2,254,303/sec\r\nas...\t\t2,735,628/sec\r\nas...\t\t2,716,915/sec`\r\n\r\nWith COARSE\r\n`[denis@centosvm example]$ ./bench \r\n*******************************************************************************\r\nSingle thread, 1,048,576 iterations, auto flush=0\r\n*******************************************************************************\r\nrotating_st...\t\t966,354/sec\r\ndaily_st...\t\t862,434/sec\r\nnull_st...\t\t2,835,814/sec\r\n\r\n*******************************************************************************\r\n10 threads sharing same logger, 1,048,576 iterations, auto_flush=0\r\n*******************************************************************************\r\nrotating_mt...\t\t1,492,719/sec\r\ndaily_mt...\t\t1,248,143/sec\r\nnull_mt...\t\t2,209,334/sec\r\n\r\n*******************************************************************************\r\nasync logging.. 10 threads sharing same logger, 1,048,576 iterations, auto_flush=0\r\n*******************************************************************************\r\nas...\t\t2,841,635/sec\r\nas...\t\t4,245,019/sec\r\nas...\t\t4,100,125/sec`\r\n\r\nHuge bust in async case because most of the time is spent on getting the clock value"},"comment":{"url":"https://api.github.com/repos/gabime/spdlog/issues/comments/71678630","html_url":"https://github.com/gabime/spdlog/pull/38#issuecomment-71678630","issue_url":"https://api.github.com/repos/gabime/spdlog/issues/38","id":71678630,"user":{"login":"divaykin","id":331169,"avatar_url":"https://avatars.githubusercontent.com/u/331169?v=3","gravatar_id":"","url":"https://api.github.com/users/divaykin","html_url":"https://github.com/divaykin","followers_url":"https://api.github.com/users/divaykin/followers","following_url":"https://api.github.com/users/divaykin/following{/other_user}","gists_url":"https://api.github.com/users/divaykin/gists{/gist_id}","starred_url":"https://api.github.com/users/divaykin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divaykin/subscriptions","organizations_url":"https://api.github.com/users/divaykin/orgs","repos_url":"https://api.github.com/users/divaykin/repos","events_url":"https://api.github.com/users/divaykin/events{/privacy}","received_events_url":"https://api.github.com/users/divaykin/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T16:31:59Z","updated_at":"2015-01-27T16:31:59Z","body":"Yeah, I think most of the systems are on 1000Hz ticks nowadays. \r\n\r\nWould be even cooler to use RDTSC but it's somewhat difficult to translate to wall clock time. We can get another 15-20% improvement if we manage to do so."}}