Skip to content

Commit

Permalink
fixup! Add pprofLabelForThreadNames config
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhaller committed Nov 23, 2023
1 parent fb5bcaf commit d5ac1c6
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions service/dap/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1401,36 +1401,13 @@ func TestGoroutineLabels(t *testing.T) {
showPprofLabelsConfig []string
expectedPrefixWithLabel string
}{
{
[]string{},
"* [Go 1]",
},
{
[]string{"k1"},
"* [Go 1 v1]",
},
{
[]string{"k2"},
"* [Go 1 v2]",
},
{
// When passing keys explicitly, we show them in the given order
[]string{"k2", "k1"},
"* [Go 1 k2:v2 k1:v1]",
},
{
[]string{"unknown"},
"* [Go 1]",
},
{
[]string{"unknown", "k1"},
"* [Go 1 k1:v1]",
},
{
// Special case for showing all labels; labels are shown sorted by key
[]string{"*"},
"* [Go 1 k1:v1 k2:v2]",
},
{[]string{}, "* [Go 1]"},
{[]string{"k1"}, "* [Go 1 v1]"},
{[]string{"k2"}, "* [Go 1 v2]"},
{[]string{"k2", "k1"}, "* [Go 1 k2:v2 k1:v1]"}, // When passing keys explicitly, we show them in the given order
{[]string{"unknown"}, "* [Go 1]"},
{[]string{"unknown", "k1"}, "* [Go 1 k1:v1]"},
{[]string{"*"}, "* [Go 1 k1:v1 k2:v2]"}, // Special case for showing all labels; labels are shown sorted by key
}
for _, tc := range tests {
runTest(t, "goroutineLabels", func(client *daptest.Client, fixture protest.Fixture) {
Expand Down

0 comments on commit d5ac1c6

Please sign in to comment.