1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
kyverno/pkg/engine/api/stats.go
Charles-Edouard Brétéché 892b8f921d
refactor: clean engine api package (#6156)
* refactor: introduce engine api package

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* status

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* refactor: clean engine api package

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* cleanup

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-01-30 14:49:44 +00:00

23 lines
672 B
Go

package api
import (
"time"
)
// ExecutionStats stores the statistics for the single policy/rule application
type ExecutionStats struct {
// ProcessingTime is the time required to apply the policy/rule on the resource
ProcessingTime time.Duration
// Timestamp of the instant the policy/rule got triggered
Timestamp int64
}
// PolicyStats stores statistics for the single policy application
type PolicyStats struct {
// ExecutionStats policy execution stats
ExecutionStats
// RulesAppliedCount is the count of rules that were applied successfully
RulesAppliedCount int
// RulesErrorCount is the count of rules that with execution errors
RulesErrorCount int
}