git://git.iain.cx/iain
/
pstop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more cleanups
[pstop.git]
/
i_s
/
processlist
/
private.go
diff --git
a/i_s/processlist_row.go
b/i_s/processlist/private.go
similarity index 87%
rename from
i_s/processlist_row.go
rename to
i_s/processlist/private.go
index
470d545
..
fe1792a
100644
(file)
--- a/
i_s/processlist_row.go
+++ b/
i_s/processlist/private.go
@@
-1,6
+1,6
@@
// This file contains the library routines for managing the
// table_io_waits_by_table table.
// This file contains the library routines for managing the
// table_io_waits_by_table table.
-package
i_s
+package
processlist
import (
"database/sql"
import (
"database/sql"
@@
-22,7
+22,7
@@
CREATE TEMPORARY TABLE `PROCESSLIST` (
*/
// a row from information_schema.processlist
*/
// a row from information_schema.processlist
-type
processlist
_row struct {
+type
table
_row struct {
ID uint64
USER string
HOST string
ID uint64
USER string
HOST string
@@
-32,11
+32,11
@@
type processlist_row struct {
STATE string
INFO string
}
STATE string
INFO string
}
-type
processlist_rows []processlist
_row
+type
table_rows []table
_row
// get the output of I_S.PROCESSLIST
// get the output of I_S.PROCESSLIST
-func select_processlist(dbh *sql.DB)
processlist
_rows {
- var t
processlist
_rows
+func select_processlist(dbh *sql.DB)
table
_rows {
+ var t
table
_rows
var id sql.NullInt64
var user sql.NullString
var host sql.NullString
var id sql.NullInt64
var user sql.NullString
var host sql.NullString
@@
-57,7
+57,7
@@
func select_processlist(dbh *sql.DB) processlist_rows {
defer rows.Close()
for rows.Next() {
defer rows.Close()
for rows.Next() {
- var r
processlist
_row
+ var r
table
_row
if err := rows.Scan(
&id,
&user,
if err := rows.Scan(
&id,
&user,
@@
-91,11
+91,11
@@
func select_processlist(dbh *sql.DB) processlist_rows {
}
// describe a whole row
}
// describe a whole row
-func (r
processlist
_row) String() string {
+func (r
table
_row) String() string {
return fmt.Sprintf("FIXME otuput of i_s")
}
// describe a whole table
return fmt.Sprintf("FIXME otuput of i_s")
}
// describe a whole table
-func (t
processlist
_rows) String() string {
+func (t
table
_rows) String() string {
return fmt.Sprintf("FIXME otuput of i_s")
}
return fmt.Sprintf("FIXME otuput of i_s")
}