INNER CODE UNIT · Go
initCoreComponents
alibaba/sentinel-golang · api/init.go:84
func initCoreComponents() error {
if config.MetricLogFlushIntervalSec() > 0 {
if err := metric.InitTask(); err != nil {
return err
}
}
systemStatInterval := config.SystemStatCollectIntervalMs()
loadStatInterval := systemStatInterval
cpuStatInterval := systemStatInterval
memStatInterval := systemStatInterval
if config.LoadStatCollectIntervalMs() > 0 {
loadStatInterval = config.LoadStatCollectIntervalMs()
}
if config.CpuStatCollectIntervalMs() > 0 {
cpuStatInterval = config.CpuStatCollectIntervalMs()
}