Git Product home page Git Product logo

libcircllhist's People

Contributors

alyssawilk avatar bdunavant avatar cody271 avatar esproul avatar heinrichhartmann avatar kamelkev avatar lupino3 avatar pamaddox avatar postwait avatar redhotpenguin avatar samuelwm01 avatar sesmith177 avatar vasuraman11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcircllhist's Issues

unable to run it in mac [need help]

Hi,

I followed the instruction in the readme file but still I am unable to get it working in my mac.
I get the below error

libcircllhist.so was not found on your system.
Please install libcircllhist from: https://github.com/circonus-labs/libcircllhist/

I am debugging this further, but if there are any pointers it will be of great help.

Mismatch of the format specifier and variable type

When compiling circllhist_print.c, Clang emits the following warning due to mismatch of the format specifier and variable type. This does not happen on 64-bit machines, because size_t is 64-bit long there and matches uint64_t, but on 32-bit it is not.

circllhist_print.c:28:49: warning: format specifies type 'size_t'
      (aka 'unsigned int') but the argument has type 'uint64_t' (aka
      'unsigned long long') [-Wformat]
        printf("%s\"%g\":%zu", i ? "," : "", v, vc);
                         ~~~                    ^~
                         %llu
1 warning generated.

Unused variable warning

Using the latest commit release in Envoy Proxy generates the following warnings.

https://github.com/circonus-labs/libcircllhist/blob/master/src/circllhist.c#L1181
https://github.com/circonus-labs/libcircllhist/blob/master/src/circllhist.c#L1241

external/com_github_circonus_labs_libcircllhist/src/circllhist.c:1181:7: warning: unused variable 'i' [-Wunused-variable]
  int i, tgt_idx, src_idx;
      ^
external/com_github_circonus_labs_libcircllhist/src/circllhist.c:1241:7: warning: unused variable 'i' [-Wunused-variable]
  int i, tgt_idx, src_idx;
      ^
2 warnings generated.

Wrong LDFLAGS on FreeBSD

The configure.ac scripts sets up LDFLAGS for FreeBSD to the value

LDFLAGS="$LDFLAGS -export-dynamic -L/usr/local/lib"

The option -export-dynamic is interpreted as an option -e (set entry point) with operand xport-dynamic which is nonsensical and causes spurious configure test failures. Please patch LDFLAGS to use -Wl,-E as on other platforms instead.

`hist_approx_count_below` includes values > threshold

The description for hist_approx_count_below reads Returns the number of values in buckets that are entirely lower than or equal to threshold. However, currently the method includes values greater than threshold.

Consider the values 109, 110, 111 stored in the histogram. The counts for the buckets will be as follows:


                         bucket.val   bucket.exp  count
hist->bvs[0]:                    10           2       1
hist->bvs[1]:                    11           2       2

For a threshold of 110, this line will return true for both buckets, even though clearly the value 111 stored in the second bucket is greater than the threshold.

That line should read if (threshold < bucket_lower) to ensure values over the threshold are not included in the count.

Issue with hist_accumulate and hist_clear

Consider the code

histogram_t* main_thread_interval_hist = hist_alloc();
histogram_t* per_thread_interval_hist = hist_alloc();
hist_insert_intscale(per_thread_interval_hist, 1, 0, 1);
double in[9] = {0, 0.25, 0.5, 0.75, 0.90, 0.95, 0.99, 0.999, 1};
double out[9];
hist_approx_quantile(main_thread_interval_hist, in, 9,out);
histogram_t* hist_array[1];
hist_array[0] = per_thread_interval_hist;
hist_accumulate(main_thread_interval_hist, hist_array, ARRAY_SIZE(hist_array));
hist_clear(per_thread_interval_hist);
//hist_free(per_thread_interval_hist);
//per_thread_interval_hist = hist_alloc();
hist_array[0] = per_thread_interval_hist;
hist_insert_intscale(per_thread_interval_hist, 2, 0, 1);
//hist_clear(main_thread_interval_hist);
//hist_free(main_thread_interval_hist);
main_thread_interval_hist = hist_alloc();
hist_accumulate(main_thread_interval_hist, hist_array, ARRAY_SIZE(hist_array));
hist_approx_quantile(main_thread_interval_hist, in, 9,out);
std::cout<<"after accumulations :"<<out[0]<<"==> \n";
histogram_t* direct_hist = hist_alloc();
hist_insert_intscale(direct_hist, 2, 0, 1);
hist_approx_quantile(direct_hist, in, 9,out);
std::cout<<"direct :"<<out[0]<<"==> \n";

I expect direct and after accumulations to give the same output. But it gives 1 in first bin (rest of the bins are same) for accumulation case and 2 in the direct case.
If I change the code to free and hist_alloc it works correctly in both the cases. Is this is a corner case issue with hist_clear?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.