Skip to content

Commit

Permalink
perfschema: rename TIDB_GOROUTINES to TIDB_PROFILE_GOROUTINES (pingca…
Browse files Browse the repository at this point in the history
…p#13183)

Signed-off-by: Lonng <heng@lonng.org>
  • Loading branch information
sre-bot authored and bb7133 committed Nov 6, 2019
1 parent b5d3248 commit 4815107
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions infoschema/perfschema/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var perfSchemaTables = []string{
tableTiDBProfileMutex,
tableTiDBAllocsProfile,
tableTiDBProfileBlock,
tableTiDBGoroutine,
tableTiDBProfileGoroutines,
}

// tableGlobalStatus contains the column name definitions for table global_status, same as MySQL.
Expand Down Expand Up @@ -440,8 +440,8 @@ const tableTiDBProfileBlock = "CREATE TABLE IF NOT EXISTS " + tableNameTiDBProfi
"DEPTH INT(8) NOT NULL," +
"FILE VARCHAR(512) NOT NULL);"

// tableTiDBGoroutine contains the columns name definitions for table events_goroutine
const tableTiDBGoroutine = "CREATE TABLE IF NOT EXISTS " + tableNameTiDBGoroutines + " (" +
// tableTiDBProfileGoroutines contains the columns name definitions for table events_goroutine
const tableTiDBProfileGoroutines = "CREATE TABLE IF NOT EXISTS " + tableNameTiDBProfileGoroutines + " (" +
"FUNCTION VARCHAR(512) NOT NULL," +
"ID INT(8) NOT NULL," +
"STATE VARCHAR(16) NOT NULL," +
Expand Down
4 changes: 2 additions & 2 deletions infoschema/perfschema/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
tableNameTiDBProfileMutex = "tidb_profile_mutex"
tableNameTiDBProfileAllocs = "tidb_profile_allocs"
tableNameTiDBProfileBlock = "tidb_profile_block"
tableNameTiDBGoroutines = "tidb_goroutines"
tableNameTiDBProfileGoroutines = "tidb_profile_goroutines"
)

// perfSchemaTable stands for the fake table all its data is in the memory.
Expand Down Expand Up @@ -107,7 +107,7 @@ func (vt *perfSchemaTable) getRows(ctx sessionctx.Context, cols []*table.Column)
fullRows, err = (&profile.Collector{}).ProfileGraph("allocs")
case tableNameTiDBProfileBlock:
fullRows, err = (&profile.Collector{}).ProfileGraph("block")
case tableNameTiDBGoroutines:
case tableNameTiDBProfileGoroutines:
fullRows, err = (&profile.Collector{}).Goroutines()
}
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion util/profile/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ func (s *profileSuite) TestProfiles(c *C) {
tk.MustExec("select * from performance_schema.tidb_profile_allocs")
tk.MustExec("select * from performance_schema.tidb_profile_mutex")
tk.MustExec("select * from performance_schema.tidb_profile_block")
tk.MustExec("select * from performance_schema.tidb_goroutines")
tk.MustExec("select * from performance_schema.tidb_profile_goroutines")
}

0 comments on commit 4815107

Please sign in to comment.