modify logger level from info to error (#744)

* modify logger level from `info` to `error`

* fix test

* improve tokio runtime config

* add rustfs helm chart files (#747)

* add rustfs helm chart files

* update readme file with helm chart

* delete helm chart license file

* fix typo in readme file

* fix: restore localized samples in tests (#749)

* fix: restore required localized examples

* style: fix formatting issues

* improve code for Observability

* upgrade crates version

* fix

* up

* fix

---------

Co-authored-by: majinghe <42570491+majinghe@users.noreply.github.com>
Co-authored-by: 安正超 <anzhengchao@gmail.com>
This commit is contained in:
houseme
2025-10-29 19:20:53 +08:00
committed by GitHub
parent 2ceb65adb4
commit 0714c7a9ca
21 changed files with 539 additions and 419 deletions
-27
View File
@@ -12,29 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(feature = "gpu")]
use crate::GlobalError;
#[cfg(feature = "gpu")]
use crate::system::attributes::ProcessAttributes;
#[cfg(feature = "gpu")]
use crate::system::metrics::Metrics;
#[cfg(feature = "gpu")]
use nvml_wrapper::Nvml;
#[cfg(feature = "gpu")]
use nvml_wrapper::enums::device::UsedGpuMemory;
#[cfg(feature = "gpu")]
use sysinfo::Pid;
#[cfg(feature = "gpu")]
use tracing::warn;
/// `GpuCollector` is responsible for collecting GPU memory usage metrics.
#[cfg(feature = "gpu")]
pub struct GpuCollector {
nvml: Nvml,
pid: Pid,
}
#[cfg(feature = "gpu")]
impl GpuCollector {
pub fn new(pid: Pid) -> Result<Self, GlobalError> {
let nvml = Nvml::init().map_err(|e| GlobalError::GpuInitError(e.to_string()))?;
@@ -64,21 +55,3 @@ impl GpuCollector {
Ok(())
}
}
#[cfg(not(feature = "gpu"))]
pub struct GpuCollector;
#[cfg(not(feature = "gpu"))]
impl GpuCollector {
pub fn new(_pid: sysinfo::Pid) -> Result<Self, crate::GlobalError> {
Ok(GpuCollector)
}
pub fn collect(
&self,
_metrics: &crate::system::metrics::Metrics,
_attributes: &crate::system::attributes::ProcessAttributes,
) -> Result<(), crate::GlobalError> {
Ok(())
}
}