forked from collectd/collectd
-
Notifications
You must be signed in to change notification settings - Fork 8
Add distribution metrics #39
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
Open
bkjg
wants to merge
91
commits into
octo:project-bkjg
Choose a base branch
from
bkjg:distribution-metrics
base: project-bkjg
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 79 commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
5670907
Add distribution header file
bkjg e060f37
Add draft of distribution functions
bkjg 25be9e0
Add implementation of distribution_new_linear function
bkjg 0144c2f
Add implementation of bucket_new_linear function
bkjg d14f5b9
Remove one argument from distribution_new_exponential function
bkjg 3721e29
Add implementation of distribution_new_exponential function
bkjg 8922e23
Add implementation of bucket_new_exponential function
bkjg 7ac8dfd
Add implementation of distribution_new_custom function
bkjg 4c155e5
Add implementation of distribution_destroy function
bkjg 7578c49
Add implementation of bucket_new_custom function
bkjg 27bdc61
Fix bugs
bkjg 009a5bb
Add implementation of distribution_update function
bkjg ae32597
Add implementation of distribution_percentile function
bkjg 40bc6eb
Add implementation of distribution_average function
bkjg bba200a
Add mutex to distribution_update function
bkjg 18fe3a4
Add implementation of distribution_clone function
bkjg 6108428
Change the type returned by distribution_clone function
bkjg 618c944
Add cheking null pointeres
bkjg 52c8e49
Make the code thread safe
bkjg 7169ca3
Little pointers fixes
bkjg b8a766b
Add initial_size to distribution_h structure
bkjg 2fb1e01
Clang format
bkjg fc5e6e6
Add initialization and destruction of mutex
bkjg 6c91ed6
Fix potential attempt to read a null pointer
bkjg 43cdba6
Add distribution metrics to the build system
bkjg d080a28
Replace copying distribution metrics by mutex
bkjg 0e7ff74
Changed custom_bucket_sizes to custom_bucket_boundaries
bkjg 200cd28
Extend the comments in distribution.h file
bkjg 791f9bf
Change the values returned from percentile and average functions
bkjg 980aa9d
Add license
bkjg 5157345
Fix email in the license
bkjg 13cfe62
Add checking the correctness of the boundaries
bkjg c2aa581
Rename num_buckets to num_boundaries for custom boundaries
bkjg 37d5df8
Fix seg fault in distribution initializating functions
bkjg 4b05e22
Fix the seg fault in distribution_new_custom function
bkjg 013e65b
Add function for comparision of distributions
bkjg 48617a1
Remove casting pointers after calloc
bkjg 93d8a7a
Add casting to uint64_t in distribution_percentile function
bkjg 8ed4657
Rename ptr to idx in bucket_update function
bkjg 959f65e
Add comment in distribution.h file
bkjg 4f9777e
Add condition to distribution_percentile function
bkjg 3897da0
Fix binary search algorithm
bkjg e3982c3
Add distribution tests to the build system
bkjg c32146e
Add first distribution test - testing distribution_new_linear
bkjg 66b81a0
Add unit tests for distribution_new_linear function
bkjg 02b61bb
Add unit tests for the distribution_new_exponential function
bkjg 923a41e
Start implementing tests form distribution_new_custom function
bkjg 5c2551a
Add unit tests for the distribution_new_custom function
bkjg f603aa8
Add checking for not null in tests
bkjg b6fb8fd
Delete invalid tests
bkjg e5ad13b
Start implementing tests for distribution_clone function
bkjg e883c54
Add unit tests for the distribution_clone function
bkjg 93cd883
Add unit tests for the distribution_average function
bkjg 2770ba9
Add draft of unit tests for distribution_percentile function
bkjg 2de7767
Add another unit tests for distribution_percentile function
bkjg faff4db
Add TODO
0caa54b
Implement getters functions
bkjg f8ce011
Move implementation of distribution_new_linear test to use getters
bkjg f714545
Move implementation of distribution_new_exponential and distribution_…
bkjg 3b52335
Change signature of distribution_update function to int
bkjg 36177a9
Fix heap buffer overflow error in bucket_update function
bkjg a568b19
Fix problems with getters and rename initial_size to base
bkjg 3950d11
Implement tests for distribution_update and distribution_get_num_buckets
bkjg 567ca20
Merge remote-tracking branch 'origin/distribution-metrics' into distr…
bkjg 6e94531
Implement tests for distribution_get_buckets_boundaries
bkjg 61caf83
Fix bugs in distribution_get_buckets_boundaries function
bkjg 6d4afb2
Implement tests for distribution_get_buckets_counters function
bkjg fcbe7f0
Implement tests for distribution_get_sum_gauges and distribution_chec…
bkjg 557dbd3
Add checking errno inside unit tests
bkjg 5ed12d8
Add condition to distribution_new_custom function
bkjg 8abc56e
Clang format
bkjg 0fb5f5d
Replace constant number with static const variable
bkjg 4e2fedd
Remove distribution.c include in distribution_test.c file
bkjg 15c47fd
Add getters to the distribution header file
bkjg 44991a3
Remove creating libdistribution.la from Makefile.am
bkjg e0246de
Add distribution_benchmark to Makefile.am
bkjg 350e9f5
Add benchmark
bkjg 50cc412
Add bash script for running distribution_benchmark
bkjg 286f762
Clang format
bkjg b8a3350
Little fixes in benchmark and in functions for the distribution_t str…
bkjg 5c162bd
Add distribution_benchmark for the different types of distribution
bkjg 06c542e
Change number of iterations in the benchmark
bkjg 8e5f95b
Change steps in script for running benchmark
bkjg 06a62fd
Started introducing checking nulls in tests
bkjg 17385fa
Move checking the custom buckets boundaries before allocating buckets
bkjg cb6c55d
Add comments about buckets' boundaries
bkjg e77c4bd
Add comments to the header file
bkjg 7e3ad57
Fix returning NAN in distribution_average if there was no updates
bkjg 9608d1b
Add checking nulls to the distribution_test
bkjg 16af7af
Add two corner cases to tests for distribution_new_exponential function
bkjg 2926727
Add unlocking mutexes in case on failure in distribution_check_equal …
bkjg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
for i in {1..200} | ||
do | ||
./distribution_benchmark $((20 * $i)) | ||
done |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option would be to write the step directly into the for loop like this:
for i in {20..4000..20}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting suggestion, I have never heard about this third argument before. Thanks!