Details
-
Improvement
-
Resolution: Fixed
-
Major
-
3.0.1
-
Security Level: Public
-
None
-
KV: Oct 4 - Oct 24
Description
# opreport -l /opt/couchbase/bin/memcached
|
CPU: Intel Westmere microarchitecture, speed 1596 MHz (estimated)
|
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
|
samples % symbol name
|
...
|
38 2.2170 get_log_level
|
...
|
I see that there is...
perform_callbacks(ON_LOG_LEVEL, NULL, NULL);
|
... infrastructure, which is well used here...
//file_logger.c
|
current_log_level = sapi->log->get_level();
|
sapi->callback->register_callback(NULL, ON_LOG_LEVEL, on_log_level, NULL);
|
// extension_logger.c
|
current_log_level = sapi->log->get_level();
|
sapi->callback->register_callback(NULL, ON_LOG_LEVEL,
|
on_log_level, NULL);
|
... for some reason is NOT used on a hot path in Couchbase:
void LOG(EXTENSION_LOG_LEVEL severity, const char *fmt, ...) { |
...
|
if (loggerApi->get_level() <= severity) { |
That would speed up Couchbase 2%, which is something very handsome for this price, what do you think?
Attachments
Issue Links
- relates to
-
MB-16390 oprofile) get_logger on a hot path
- Closed
For Gerrit Dashboard: MB-16391 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
55802,9 | MB-16391: Allow for engines to cache log level | master | memcached | Status: MERGED | +2 | +1 |
55803,5 | MB-16391: Cache the current log level | master | ep-engine | Status: MERGED | +2 | +1 |