Skip to content

Commit

Permalink
build(deps): upgrade sysinfo to version 0.33.0 (#3606)
Browse files Browse the repository at this point in the history
* build(deps): upgrade sysinfo to version 0.33.0
- fix #3042 segmentation error due to a sysinfo crate [bug](GuillaumeGomez/sysinfo#1052) with 0.29.1 to 0.29.9

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
TimmyOVO and autofix-ci[bot] authored Dec 23, 2024
1 parent 4184a0e commit 3d8dafd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 12 deletions.
70 changes: 61 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/tabby/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ opentelemetry-otlp.workspace = true
opentelemetry-semantic-conventions.workspace = true
tantivy = { workspace = true }
anyhow = { workspace = true }
sysinfo = "0.29.8"
sysinfo = "0.33.0"
nvml-wrapper = "0.9.0"
http-api-bindings = { path = "../http-api-bindings" }
async-stream = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/tabby/src/services/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::env::consts::ARCH;
use anyhow::Result;
use nvml_wrapper::Nvml;
use serde::{Deserialize, Serialize};
use sysinfo::{CpuExt, System, SystemExt};
use sysinfo::System;
use tabby_common::config::{ModelConfig, ModelConfigGroup};
use utoipa::ToSchema;

Expand Down Expand Up @@ -65,7 +65,7 @@ fn to_model_name(model: &Option<ModelConfig>) -> Option<String> {

pub fn read_cpu_info() -> (String, usize) {
let mut system = System::new_all();
system.refresh_cpu();
system.refresh_cpu_all();
let cpus = system.cpus();
let count = cpus.len();
let info = if count > 0 {
Expand Down

0 comments on commit 3d8dafd

Please sign in to comment.