Giter VIP home page Giter VIP logo

Comments (4)

remicollet avatar remicollet commented on August 15, 2024

+1

from hdrhistogram_c.

mikeb01 avatar mikeb01 commented on August 15, 2024

I didn't want to leak this function out to users outside of the hdr histogram, hence the lack of a prototype in the headers and instead including the prototype in the hdr_histogram_log.c. Is there a reason why the serialisation provided in hdr_histogram_log.{h,c} isn't sufficient? Are there some other use cases for this method that I'm missing?

I'm not dead-set against exposing this function, but would like to understand the use cases a bit more first.

from hdrhistogram_c.

mikeb01 avatar mikeb01 commented on August 15, 2024

It's been 3 months, but no follow-up to this issue therefore closing.

from hdrhistogram_c.

beberlei avatar beberlei commented on August 15, 2024

@mikeb01 sorry for the late reply:

  1. I reimplemented the serialization in the PHP library, because i wanted to convert the data to a structured PHP array that can then be serialized into anything, JSON, binary string or whatever else the user needs instead of forcing a base 64 encoded binary string, that cannot be processed further.
  2. I added an optimization in the export, where he detects when the last bucket with items in it is found and skips everything above it. This way you can make the stored data much smaller, because we only rarely have outliers in the buckets on the high end.
  3. I want to potentially decode the code in Go later, so a more structured serialization feels safe.

This also leads to having to implement a import, which requires the reset method to function.

The format for decode used in PHP is in C struct:

struct {
   ltv long
   htf long
   sf long
   counts long[]
}

from hdrhistogram_c.

Related Issues (20)

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.