Giter Site home page Giter Site logo

Include timings about cargo2junit HOT 10 CLOSED

johnterickson avatar johnterickson commented on July 21, 2024
Include timings

from cargo2junit.

Comments (10)

mathstuf avatar mathstuf commented on July 21, 2024

It looks like cargo might need to provide this information first :/ .

from cargo2junit.

svenstaro avatar svenstaro commented on July 21, 2024

Seems it includes it just fine in the JSON output:

{ "type": "suite", "event": "ok", "passed": 15, "failed": 0, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.219172866 }

from cargo2junit.

mathstuf avatar mathstuf commented on July 21, 2024

I was thinking about per-test timings, not test suite level timings.

from cargo2junit.

svenstaro avatar svenstaro commented on July 21, 2024

Well, it would be a start though.

from cargo2junit.

svenstaro avatar svenstaro commented on July 21, 2024

Actually, we can get the per-test timings just fine: -Z unstable-options --format json --report-time

{ "type": "suite", "event": "started", "test_count": 2 }
{ "type": "test", "event": "started", "name": "can_get_health" }
{ "type": "test", "event": "started", "name": "can_get_index" }
{ "type": "test", "name": "can_get_health", "event": "ok", "exec_time": 0.039503535 }
{ "type": "test", "name": "can_get_index", "event": "ok", "exec_time": 0.029446912 }
{ "type": "suite", "event": "ok", "passed": 2, "failed": 0, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.044548753 }

from cargo2junit.

svenstaro avatar svenstaro commented on July 21, 2024

Actually it seems to just work already in cargo2junit: -Z unstable-options --format json --report-time | cargo2junit. It's implemented here.

from cargo2junit.

mathstuf avatar mathstuf commented on July 21, 2024

Oh nifty. That's good to hear. I guess this can be closed then?

from cargo2junit.

svenstaro avatar svenstaro commented on July 21, 2024

I just confirmed that the timings show up alright in GitLab so yeah. @johnterickson can you close this?

from cargo2junit.

mathstuf avatar mathstuf commented on July 21, 2024

I can verify that this is working in my GitLab-based project as well.

from cargo2junit.

johnterickson avatar johnterickson commented on July 21, 2024

Glad to hear this is all working!

from cargo2junit.

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.