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

Stats to file #186

Merged
merged 6 commits into from
Jan 17, 2019
Merged

Stats to file #186

merged 6 commits into from
Jan 17, 2019

Conversation

thinkingfish
Copy link
Contributor

Problem

Current stats is purely pull-based. Without external observability harness, there's no easy way of getting/preserving historical readings on application level metrics.

Solution

Providing a few functions that allow a log file to be used to store metrics as a CSV. Caller will need to setup timer to actually kick off the stats logging, such as by scheduling recurring events using timing wheel.

Result

Intend to use this in Pelikan_twemcache to facilitate the load testing that's under way.

@thinkingfish thinkingfish merged commit 4acc53a into twitter:master Jan 17, 2019
@thinkingfish thinkingfish deleted the stats_to_file branch May 8, 2019 23:25
fakeNetflix pushed a commit to fakeNetflix/twitter-repo-ccommon that referenced this pull request Aug 18, 2019
* Backport changes from pelikan to twitter/ccommon#186

* Missed a few files for rust support
fakeNetflix pushed a commit to fakeNetflix/twitter-repo-ccommon that referenced this pull request Aug 18, 2019
Backport changes from pelikan to twitter/ccommon#186

Implement proper allocation/free for BString objects

* All allocation of BStrings should happen from libc malloc() that way
  we don't mistakenly free something allocated from rust's allocator.

* Drop should call libc's free() with the pointer, doing the correct
  thing.

* This philosophy allows us to pass bstring pointers back and forth and
  not have to track which heap they're allocated on

* Provide an implementation of a zero-cost reference object, much like
  String -> &str, we have BString -> &BStr.
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.

1 participant