fossas / fossa-cli

Fast, portable and reliable dependency analysis for any codebase. Supports license & vulnerability scanning for large monoliths. Language-agnostic; integrates with 20+ build systems.
https://fossa.com
Other
1.26k stars 173 forks source link

add startTime to debug bundle #1438

Closed spatten closed 2 months ago

spatten commented 2 months ago

Overview

I was debugging a problem the other day, and it would have been useful to know the exact time that commands were starting.

This PR adds the start time to events in the debug bundle.

Acceptance criteria

Testing plan

Run cabal run fossa -- analyze --debug on a directory. Check out the bundleScope section of the debug bundle. Wherever there is a duration, there should also be a startTime.

  "bundleScope": {
    "duration": "0.017509000",
    "events": [
      {
        "duration": "0.017377000",
        "events": [
          {
            "duration": "0.002957000",
            "events": [
              ...
            ],
            "scope": "fossa-deps",
            "startTime": "2024-06-11 18:13:20.30294 UTC"
          },
          {
            "duration": "0.000131000",
            "scope": "analyze-vsi",
            "startTime": "2024-06-11 18:13:20.305948 UTC"
          }
       "scope": "fossa-analyze",
        "startTime": "2024-06-11 18:13:20.302888 UTC"
     ],
      "startTime": "2024-06-11 18:13:20.302779 UTC" 
 }

Risks

This is low risk.

Metrics

References

Checklist