Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced performance metrics #790

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft

Advanced performance metrics #790

wants to merge 32 commits into from

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Dec 29, 2024

New features

  • Better JSON export format (see below)
  • Properly support peak memory usage as a new metric
  • Support new time units: minutes and hours

To do

  • serialize unit information (long/short)
  • (ExitStatus, Second, Second, u64) => Measurement?
  • Further flesh out Measurement
  • Get rid of TimeQuantity::to_string?
  • Get rid of all new TODOs in the code
  • Review occurrences of .value_in
  • Re-add aggregate statistics to JSON export?
  • Add command line invocation to JSON export?
  • Move outlier detection to separate module
  • Support alternative target metrics

JSON format

Current version of JSON format:
{
  "results": [
    {
      "command": "fd -ug blob ~",
      "measurements": [
        {
          "time_wall_clock": {
            "value": 0.19842726476,
            "unit": "second"
          },
          "time_user": {
            "value": 0.75561904,
            "unit": "second"
          },
          "time_system": {
            "value": 2.08008938,
            "unit": "second"
          },
          "peak_memory_usage": {
            "value": 118804480,
            "unit": "byte"
          },
          "exit_code": 0
        },
        {
          "time_wall_clock": {
            "value": 0.19565810476,
            "unit": "second"
          },
          "time_user": {
            "value": 0.83431904,
            "unit": "second"
          },
          "time_system": {
            "value": 2.00121838,
            "unit": "second"
          },
          "peak_memory_usage": {
            "value": 117673984,
            "unit": "byte"
          },
          "exit_code": 0
        }
      ]
    },
    {
      "command": "find ~ -name blob",
      "measurements": [
        {
          "time_wall_clock": {
            "value": 2.45530797276,
            "unit": "second"
          },
          "time_user": {
            "value": 0.63306604,
            "unit": "second"
          },
          "time_system": {
            "value": 1.81707638,
            "unit": "second"
          },
          "peak_memory_usage": {
            "value": 10592256,
            "unit": "byte"
          },
          "exit_code": 0
        },
        {
          "time_wall_clock": {
            "value": 2.45145763076,
            "unit": "second"
          },
          "time_user": {
            "value": 0.62730604,
            "unit": "second"
          },
          "time_system": {
            "value": 1.81925538,
            "unit": "second"
          },
          "peak_memory_usage": {
            "value": 10686464,
            "unit": "byte"
          },
          "exit_code": 0
        }
      ]
    }
  ]
}

@sharkdp sharkdp force-pushed the new-metrics branch 2 times, most recently from cb9a136 to ab811dd Compare December 29, 2024 15:29
@sharkdp sharkdp changed the title New metrics Advanced performance metrics Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant