Coder Social home page Coder Social logo

bear's Issues

Negative histogram readings cause bad arith error

https://github.com/boundary/bear/blob/master/src/bear.erl#L316 seems to be the culprit.

I'm posting this issue for discussion. It is reasonable to argue that there should never be a negative reading. In which case…should I

  • add a PR to folsom that drops negative readings silently?
  • Or bad arg negative histogram readings (leaving it up to the user to detect and drop / correct / handle appropriately) negative readings?

For me, folsom histogram bad arging negative readings is the most logical, but somewhat interface breaking.

I'm just after your thoughts / input on the best location to solve this problem.

exception in histogram harmonic_mean calculation when all values == 0

If I start a histogram and log a series of 0's to it, I get the following error:

{pushysim@128.0.0.1)7>folsom_metrics:new_histogram('bar', slide, 10).
(pushysim@127.0.0.1)8> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)9> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)10> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)11> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)12> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)13> folsom_metrics:notify({'bar',0}).
ok
(pushysim@127.0.0.1)14> folsom_metrics:get_histogram_statistics('bar').
** exception error: bad argument in an arithmetic expression
     in function  bear:harmonic_mean/1 
     in call from bear:get_statistics/1 
     in call from lists:seq/2 

The quick fix would be to add a new fun-head of

harmonic_mean(#scan_result{sumInv=0}) ->
  0;

But not sure what the return value should be - 0, infinity ? Thoughts ?

It would be really useful if bear was tagged

Bear doesn't appear to have any tag of any kind so 'git describe' fails. For it to be included into a riak release, we need something we can describe.

Now I'm in trouble for breaking all the Basho builds by including folsom (and therefore bear) as a dep for riak. Would it be possible for you to tag the current version of bear to save me the trouble of maintaining a fork just to have a tag?

Folsom has moved

This repo is forked and likely unmaintained.

I no longer have access the folsom related projects and it seems like I probably won't in the near future. To continue maintaining them I have moved the project to https://github.com/folsom-project Please update your projects.

error in ranks_of

The line #287 in ranks_of/5 is never executed, bad pattern matching issue.

All is broken on 17.5 with HiPE

Since bear declares a flag to compile with HiPE support, it's surprise that it doesn't works:

$ ./rebar eunit
==> bear (eunit)
Compiled test/bear_test.erl
Compiled src/bear.erl
...
bear_test: negative2_test...*failed*
in function bear:get_statistics_subset/2
  called as get_statistics_subset([-1,-1,-2,-2,-3,-5,-6,-10],[min])
in call from bear_test:negative2_test/0 (test/bear_test.erl, line 284)
in call from bear_test:negative2_test/0
**error:undef



=ERROR REPORT==== 7-May-2015::14:36:54 ===
Native loading of /home/kxepal/projects/forks/bear/.eunit/bear.beam failed: {'EXIT',
                                                                             {badarg,
                                                                              [{hipe_bifs,
                                                                                patch_call,
                                                                                [1079926198,
                                                                                 140635773809724,
                                                                                 []],
                                                                                []},
                                                                               {hipe_unified_loader,
                                                                                patch_call_insn,
                                                                                3,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  507}]},
                                                                               {hipe_unified_loader,
                                                                                patch_bif_call_list,
                                                                                4,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  492}]},
                                                                               {hipe_unified_loader,
                                                                                patch_call,
                                                                                5,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  483}]},
                                                                               {hipe_unified_loader,
                                                                                patch,
                                                                                5,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  458}]},
                                                                               {hipe_unified_loader,
                                                                                load_common,
                                                                                4,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  235}]},
                                                                               {hipe_unified_loader,
                                                                                load_native_code,
                                                                                2,
                                                                                [{file,
                                                                                  "hipe_unified_loader.erl"},
                                                                                 {line,
                                                                                  105}]},
                                                                               {code_server,
                                                                                load_native_code,
                                                                                2,
                                                                                [{file,
                                                                                  "code_server.erl"},
                                                                                 {line,
                                                                                  1294}]}]}}
undefined
*** test module not found ***
**bear

=======================================================
  Failed: 46.  Skipped: 0.  Passed: 1.
One or more tests were cancelled.
ERROR: Cover analyze failed for bear: {not_cover_compiled,bear} "/home/kxepal/projects/forks/bear/.eunit/bear.beam"
ERROR: eunit failed while processing /home/kxepal/projects/forks/bear: {'EXIT',
    {function_clause,
        [{rebar_eunit,'-cover_write_index/2-fun-0-',[{0,0},[bear]],[]},
         {lists,partition,4,[{file,"lists.erl"},{line,1300}]},
         {rebar_eunit,cover_write_index,2,[]},
         {rebar_eunit,cover_analyze,3,[]},
         {rebar_eunit,eunit,2,[]},
         {rebar_core,run_modules,4,[]},
         {rebar_core,execute,4,[]},
         {rebar_core,process_dir,4,[]}]}}

New release 0.8.2?

Is it possible to create a 0.8.2 tag which includes this PR: #19?

It would be nice to also bump up Folsoms use of Bear to this one as well

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.