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

[backend-comparison] Add Operating System information #1531

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

syl20bnr
Copy link
Member

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#1519

Changes

Serialize the operating system information and detect the windows linux subsystem.

Examples:

  • Linux under WSL on Windows:
  "systemInfo": {
    "cpus": [
      "13th Gen Intel(R) Core(TM) i7-13700K"
    ],
    "gpus": [
      "Microsoft Direct3D12 (NVIDIA GeForce RTX 4080)"
    ],
    "os_info": {
      "os_type": "Ubuntu",
      "version": {
        "Semantic": [
          20,
          4,
          0
        ]
      },
      "edition": null,
      "codename": "focal",
      "bitness": "X64",
      "architecture": "x86_64"
    },
    "windows_linux_subsystem": true
  },
  • Windows
  "systemInfo": {
    "cpus": [
      "13th Gen Intel(R) Core(TM) i7-13700K"
    ],
    "gpus": [
      "NVIDIA GeForce RTX 4080"
    ],
    "os_info": {
      "os_type": "Windows",
      "version": {
        "Semantic": [
          10,
          0,
          22621
        ]
      },
      "edition": "Windows 11 Core",
      "codename": null,
      "bitness": "X64",
      "architecture": "x86_64"
    },
    "windows_linux_subsystem": false
  },

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 85.97%. Comparing base (da5b043) to head (5894288).
Report is 2 commits behind head on main.

Files Patch % Lines
backend-comparison/src/persistence/system_info.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1531      +/-   ##
==========================================
- Coverage   85.99%   85.97%   -0.02%     
==========================================
  Files         668      669       +1     
  Lines       76372    76421      +49     
==========================================
+ Hits        65673    65705      +32     
- Misses      10699    10716      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nathanielsimard nathanielsimard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@syl20bnr
Copy link
Member Author

syl20bnr commented Mar 26, 2024

I simplified the serialized struct.

New examples:

  • Linux under WSL:
    "os": {
      "name": "Ubuntu 20.4.0 (focal) [64-bit]",
      "wsl": true
    } 
  • Windows:
    "os": {
      "name": "Windows 10.0.22621 (Windows 11 Core) [64-bit]",
      "wsl": false
    }
  • MacOS:
    "os": {
      "name": "Mac OS 14.4.0 [64-bit]",
      "wsl": false
    }

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that was easy! LGTM 🚀

@syl20bnr
Copy link
Member Author

I will merge this PR at the end of all the modifications. I'll deploy the server to production and reset the database,

@syl20bnr syl20bnr merged commit 28233d9 into main Mar 26, 2024
14 of 15 checks passed
@syl20bnr syl20bnr deleted the feat/operating-system-info branch March 26, 2024 19:58
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.

3 participants