Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracing Service #53

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Tracing Service #53

wants to merge 5 commits into from

Conversation

oktal
Copy link

@oktal oktal commented Oct 17, 2013

This Pull Request includes two components :

  • Tracing Service aggregates all traces from syslog and exposes raw data through a REST API ;
  • Tracing Client queries the REST API and display the datas.

@ghost ghost assigned pixelbox and RAttab Oct 17, 2013

}

struct App {
// See Ring::add below for the reason of this assertion
static_assert(!(MaxEntries & 1), "MaxEntries must be 2^M");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That only check that the number is pair. To check for 2^M use this instead:
https://github.com/RAttab/lockless/blob/master/src/utils.h#L30
This checks that there's only one bit set which means that you're a power of 2 that's greater then 0

}
}

private:
std::array<TraceEntry, MaxEntries> entries;
uint64_t index;
struct Ring {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal style comment which you're free to ignore: since you're in a cc file, you don't have to shove everything within a single class. I'd just shove them at file scope in an anonymous namespace which reduce the amount of crap you have in your class and makes everything easier to read and less indented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants