GithubHelp home page GithubHelp logo

Comments (3)

mxinden avatar mxinden commented on June 20, 2024

You are right. Thank you for the report. I have discovered the same with https://github.com/libp2p/rust-libp2p/tree/master/misc/metrics.

I have fixed this issue in #149 (not yet released). A nice side-effect is that it significantly simplifies the Collector trait.

@allada would you mind testing with latest master, i.e. with #149 included?

I am sorry for not having patched this earlier. Thanks for debugging.

(Good to see the Collector trait, while faulty, needed and used.)

from client_rust.

allada avatar allada commented on June 20, 2024

It looks like the entire API has changed a lot and without having non-code-based documentation that I can use it's going to be difficult to test this in our system without refactoring everything.

However, you might be interested in seeing the wrappers we are using, as it might give you some ideas on API designs:

Internal metrics api:
https://github.com/allada/turbo-cache/blob/fd1de941b796287abe24dad852ed50a27d5d86af/util/prometheus_utils.rs

Example usage:
https://github.com/allada/turbo-cache/blob/fd1de941b796287abe24dad852ed50a27d5d86af/cas/worker/running_actions_manager.rs#L1138
https://github.com/allada/turbo-cache/blob/fd1de941b796287abe24dad852ed50a27d5d86af/cas/worker/local_worker.rs#L484
https://github.com/allada/turbo-cache/blob/fd1de941b796287abe24dad852ed50a27d5d86af/util/evicting_map.rs#L375

There was also a short discussion that we had here:
TraceMachina/nativelink#209

You might be interested in the idea of a procedural macro.

from client_rust.

mxinden avatar mxinden commented on June 20, 2024

It looks like the entire API has changed a lot and without having non-code-based documentation that I can use it's going to be difficult to test this in our system without refactoring everything.

I am sorry for the trouble this causes on your end. I am not sure I am fully following. What is non-code-based documentation? How can I make your transition to the new Collector trait easier @allada?

You might be interested in the idea of a procedural macro.

I am not sure how a procedural macro could simplify the Collector trait. Do you have concrete suggestions in mind? In general, I try to use macros as a last resort only, especially when exposed on the public API surface.

from client_rust.

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.