Changes and fixes before the release (docs/small tweaks) (#750)

- update README.md with new docker instructions
- update docs/configuration.md
- update .github/workflows to have pinned action versions
- gofmt events package
- fix small bugs in CI scripts
- reduce config options for internal/perf/monitor and config. A ring buffer is used to keep 1hr of entries at max 5s granularity. For long term stats use prometheus monitoring on /metrics

Fixes #744
This commit is contained in:
Benson Wong
2026-05-13 21:18:19 -07:00
committed by GitHub
parent 3e3646f9f9
commit a4b91e08cf
23 changed files with 499 additions and 569 deletions
+5 -16
View File
@@ -7,19 +7,14 @@ import (
// PerformanceConfig holds configuration for system performance monitoring
type PerformanceConfig struct {
Enable bool `yaml:"enable"`
Every time.Duration `yaml:"every"`
MaxAge time.Duration `yaml:"maxAge"`
GC time.Duration `yaml:"gc"`
Disabled bool `yaml:"disabled"`
Every time.Duration `yaml:"every"`
}
func (p *PerformanceConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
type rawPerformanceConfig PerformanceConfig
defaults := rawPerformanceConfig{
Enable: true,
Every: 15 * time.Second,
MaxAge: 1 * time.Hour,
GC: 5 * time.Minute,
Every: 5 * time.Second,
}
if err := unmarshal(&defaults); err != nil {
@@ -32,14 +27,8 @@ func (p *PerformanceConfig) UnmarshalYAML(unmarshal func(interface{}) error) err
// Validate checks the PerformanceConfig values and returns an error if invalid
func (p *PerformanceConfig) Validate() error {
if p.Every < time.Second {
return fmt.Errorf("every must be at least 1s, got %v", p.Every)
}
if p.MaxAge <= 0 {
return fmt.Errorf("maxAge must be greater than 0, got %v", p.MaxAge)
}
if p.GC <= 0 {
return fmt.Errorf("gc must be greater than 0, got %v", p.GC)
if p.Every < 5*time.Second {
return fmt.Errorf("every must be at least 5s, got %v", p.Every)
}
return nil
}