gitea源码

1234567891011121314151617181920212223242526
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package gtprof
  4. // This is a Gitea-specific profiling package,
  5. // the name is chosen to distinguish it from the standard pprof tool and "GNU gprof"
  6. // LabelGracefulLifecycle is a label marking manager lifecycle phase
  7. // Making it compliant with prometheus key regex https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
  8. // would enable someone interested to be able to continuously gather profiles into pyroscope.
  9. // Other labels for pprof should also follow this rule.
  10. const LabelGracefulLifecycle = "graceful_lifecycle"
  11. // LabelPid is a label set on goroutines that have a process attached
  12. const LabelPid = "pid"
  13. // LabelPpid is a label set on goroutines that have a process attached
  14. const LabelPpid = "ppid"
  15. // LabelProcessType is a label set on goroutines that have a process attached
  16. const LabelProcessType = "process_type"
  17. // LabelProcessDescription is a label set on goroutines that have a process attached
  18. const LabelProcessDescription = "process_description"