Backport from facebook/mysql-5.6:
commit b5fda565d4bad66f3b5a6432236b96743ccfd323 Author: Steaphan Greene <steaphan@fb.com> Date: Fri Feb 7 21:34:04 2014 -0800 Add basic atomic_stats type Summary: WebScaleSQL Feature: Basic Stats Support This is a simple class template that implements an atomic stats variable. The focus is on performance, not accuracy. No set operations are guaranteed. The other operations are all atomic, so values should not actually be lost - however, there is no attempt to be consistent in reading multiple stats, nor any concern that different threads see any consistent view across multiple stats. Test Plan: This has been tested quite a bit in isolation, and no problems have been found. However, this has never been used in production. Also, a newer, more sophisticated, version of this is already in development. It also shows a small perf gain in the larger stats diffs (Table Stats, User Stats, etc...), when compared to the built-in MySQL atomics. Reviewers: pivanof Reviewed By: pivanof CC: jtolmer, MarkCallaghan, flamingcow, jeremycole, andrew-ford, inaam-rana, liang.guo.752 Differential Revision: https://reviews.facebook.net/D16029 Differential Revision: https://reviews.facebook.net/D16449
Showing
include/atomic_stat.h
0 → 100644
Please register or sign in to comment