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

bug: fix occasionally wrong run time reported by sysinfo #1542

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Aug 5, 2024

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

Seems like on other platforms, sysinfo will sometimes report a run time that starts from UNIX epoch - this gives a non-sensical value of 19000+ days, and it at least looks a little more reasonable to just return 0 in this case. I guess we can also make it return N/A in the future but this is a quick fix for now.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

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

Project coverage is 41.20%. Comparing base (3967285) to head (794ecf3).

Files Patch % Lines
src/data_collection/processes/unix/process_ext.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1542      +/-   ##
==========================================
+ Coverage   41.19%   41.20%   +0.01%     
==========================================
  Files         113      113              
  Lines       17814    17808       -6     
==========================================
  Hits         7338     7338              
+ Misses      10476    10470       -6     
Flag Coverage Δ
macos-12 36.63% <0.00%> (+0.01%) ⬆️
ubuntu-latest 43.16% <ø> (ø)
windows-2019 36.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ClementTsang ClementTsang force-pushed the fix_proc_run_time_sysinfo branch 2 times, most recently from 8f27476 to b8257f4 Compare August 5, 2024 22:55
Seems like on other platforms, sysinfo will sometimes report a run time
that starts from UNIX epoch - this gives a non-sensical value of 19000+
days, and it at least looks a little more reasonable to just return 0 in
this case. I guess we can also make it return N/A in the future but this
is a quick fix for now.
@ClementTsang ClementTsang changed the title bug: fix occasionally wrong runtime reported by sysinfo bug: fix occasionally wrong run time reported by sysinfo Aug 5, 2024
@ClementTsang ClementTsang merged commit 32f64f4 into main Aug 6, 2024
36 checks passed
@ClementTsang ClementTsang deleted the fix_proc_run_time_sysinfo branch August 6, 2024 00:15
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 10, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ClementTsang/bottom](https://github.com/ClementTsang/bottom) | patch | `0.10.1` -> `0.10.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>ClementTsang/bottom (ClementTsang/bottom)</summary>

### [`v0.10.2`](https://github.com/ClementTsang/bottom/blob/HEAD/CHANGELOG.md#0102---2024-08-05)

[Compare Source](ClementTsang/bottom@0.10.1...0.10.2)

##### Features

-   [#&#8203;1487](ClementTsang/bottom#1487): Add option to move the AVG CPU bar to another row in basic mode.

##### Bug Fixes

-   [#&#8203;1541](ClementTsang/bottom#1541): Fix some process details not updating for macOS and Windows.
-   [#&#8203;1542](ClementTsang/bottom#1542): Fix confusing process run times being reported on macOS.
-   [#&#8203;1543](ClementTsang/bottom#1543): Fix the `--default_cpu_entry` argument not being checked.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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