Git Product home page Git Product logo

Comments (7)

manugarg avatar manugarg commented on April 28, 2024

@bekriebel This is certainly a bug. Thanks for debugging this and the PR. Cloudprober's source of truth (SoT) is Google internal, which means that I'll have to import his pull request to the internal source and then export it back. Thankfully, this process preserves the original author.

Unfortunately, cloudprober was not setup properly for this kind of transformations (reverse). I was trying to sort that out over past few days. That's why delay in accepting the PR. I'll try to finish this process tomorrow.

from cloudprober.

bekriebel avatar bekriebel commented on April 28, 2024

No problem. I already have it running in my environment with this change and it is working well. This seems to be the only change necessary for the code to work well on the ARM platform.

Thanks for your work on it!

from cloudprober.

manugarg avatar manugarg commented on April 28, 2024

@bekriebel Thanks. I wanted to ask if you'd mind if I get rid of the trimming completely (that is, we'll print trailing zeros) . I think it's making code a bit obscure and not adding as much value.

I can just do it at my end if that sounds good to you.

from cloudprober.

bekriebel avatar bekriebel commented on April 28, 2024

@manugarg Yeah, that was my first inclination as well but wasn't sure if it was done this way for a reason. What do you think about just returning fmt.Sprintf("%f", f.f)? Since this is most likely being ingested by a receiver that is accepting it as a float anyway, I don't see the need to truncate the string at all. If a receiver can't accept this, it could always be truncated in the specific surfacer.

from cloudprober.

bekriebel avatar bekriebel commented on April 28, 2024

I went ahead and pushed a new version that doesn't trim or truncate. Personally, I prefer having the extra precision. It can always be truncated on a UI side or in a surfacer if desired.

from cloudprober.

manugarg avatar manugarg commented on April 28, 2024

Importing this change back as #119. Please take a look.

Keeping precision of 3 decimal points as sometimes we get really long strings in the latency (.3333333.. kind of things). Also, using strconv instead of fmt.Sprintf as strconv is a bit faster.

from cloudprober.

manugarg avatar manugarg commented on April 28, 2024

Thanks again, Brint. Closing this issue now.

from cloudprober.

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.