cicd: robot automated Change

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pull/943/head
FGadvancer 2 years ago committed by github-actions[bot]
parent 0d5e57af04
commit ac3a121f5c

@ -26,8 +26,8 @@ import (
// profiling configuration variables // profiling configuration variables
var ( var (
profileName string = "none" // Name of the profile to capture. profileName string = "none" // Name of the profile to capture.
profileOutput string = "profile.pprof" // File to write the profile data. profileOutput string = "profile.pprof" // File to write the profile data.
) )
// addProfilingFlags registers profiling related flags to the given FlagSet. // addProfilingFlags registers profiling related flags to the given FlagSet.
@ -55,10 +55,10 @@ func initProfiling() error {
} }
return pprof.StartCPUProfile(f) return pprof.StartCPUProfile(f)
case "block": case "block":
runtime.SetBlockProfileRate(1) // Sampling every block event runtime.SetBlockProfileRate(1) // Sampling every block event
return nil return nil
case "mutex": case "mutex":
runtime.SetMutexProfileFraction(1) // Sampling every mutex event runtime.SetMutexProfileFraction(1) // Sampling every mutex event
return nil return nil
default: default:
if profile := pprof.Lookup(profileName); profile == nil { if profile := pprof.Lookup(profileName); profile == nil {

@ -70,12 +70,12 @@ func Test_fetchYaml(t *testing.T) {
Tag: "!!map", Tag: "!!map",
Value: "", Value: "",
Content: []*yaml.Node{ Content: []*yaml.Node{
&yaml.Node{ {
Kind: yaml.ScalarNode, Kind: yaml.ScalarNode,
Tag: "!!str", Tag: "!!str",
Value: "key", Value: "key",
}, },
&yaml.Node{ {
Kind: yaml.ScalarNode, Kind: yaml.ScalarNode,
Tag: "!!str", Tag: "!!str",
Value: "value", Value: "value",
@ -126,12 +126,12 @@ func Test_streamYaml(t *testing.T) {
Tag: "!!map", Tag: "!!map",
Value: "", Value: "",
Content: []*yaml.Node{ Content: []*yaml.Node{
&yaml.Node{ {
Kind: yaml.ScalarNode, Kind: yaml.ScalarNode,
Tag: "!!str", Tag: "!!str",
Value: "key", Value: "key",
}, },
&yaml.Node{ {
Kind: yaml.ScalarNode, Kind: yaml.ScalarNode,
Tag: "!!str", Tag: "!!str",
Value: "value", Value: "value",

Loading…
Cancel
Save