Giter Club home page Giter Club logo

Comments (4)

schomatis avatar schomatis commented on July 2, 2024 1

Sounds good, working on this.

from go-libp2p-core.

schomatis avatar schomatis commented on July 2, 2024

@marten-seemann I suspect I'm missing some context here (I'm new in libp2p and the term 'bandwidth counter' doesn't mean anything to me) and will need this laid out in a bit more detail:

These tests are currently flaky

Which tests?

Injecting a mock clock

Where?

from go-libp2p-core.

marten-seemann avatar marten-seemann commented on July 2, 2024

Which tests?

The bandwidth tests.

Where?

Into the metrics/BandwidthCounter. Itโ€™s using the flow metrics repo, so probably we need to do it there too. Basically, the goal is that we donโ€™t use any calls to time.Now() any more, but only to a clock.Now(). When run in production, clock.Now() use time.Now(), but in tests we can use a mock clock.

from go-libp2p-core.

schomatis avatar schomatis commented on July 2, 2024

Upstream work in libp2p/go-flow-metrics#18. After that lands will proceed with applying the mock clock here.

from go-libp2p-core.

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.