Skip to content

Commit e43f99c

Browse files
authored
conprof: disable profiling tiflash (#184) (#187)
close #185
1 parent b99811b commit e43f99c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

component/conprof/http/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ func getProfileEstimateSize(component topology.Component) int {
123123
case topology.ComponentTiKV:
124124
return 200 * 1024 // profile size
125125
case topology.ComponentTiFlash:
126-
return 200 * 1024 // profile size
126+
// TODO: remove this after TiFlash fix the profile bug.
127+
return 0
127128
}
128129
return defaultProfileSize
129130
}

component/conprof/scrape/manager.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ func (m *Manager) startScrape(ctx context.Context, component topology.Component,
188188
if !continueProfilingCfg.Enable {
189189
return nil
190190
}
191+
// TODO: remove this after TiFlash fix the profile bug.
192+
if component.Name == topology.ComponentTiFlash {
193+
return nil
194+
}
191195
profilingConfig := m.getProfilingConfig(component)
192196
httpCfg := m.config.Security.GetHTTPClientConfig()
193197
addr := fmt.Sprintf("%v:%v", component.IP, component.Port)

component/conprof/scrape/manager_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ func TestManager(t *testing.T) {
9090
break
9191
}
9292
}
93+
// TODO: remove this after support tiflash
94+
require.True(t, list.Target.Component != topology.ComponentTiFlash)
9395
require.True(t, found, fmt.Sprintf("%#v", list))
9496
for _, ts := range list.TsList {
9597
require.True(t, ts >= param.Begin && ts <= param.End)
@@ -130,7 +132,8 @@ func TestManager(t *testing.T) {
130132

131133
// test for GetCurrentScrapeComponents
132134
comp := manager.GetCurrentScrapeComponents()
133-
require.Equal(t, len(comp), len(components))
135+
// TODO: update this after support tiflash
136+
require.Equal(t, len(comp), len(components)-1)
134137

135138
// test for topology changed.
136139
mockServer2 := testutil.CreateMockProfileServer(t)

0 commit comments

Comments
 (0)