From db603692f051e73aae7c3073bcd2a8a46dead813 Mon Sep 17 00:00:00 2001 From: Simon J Mudd Date: Thu, 4 Dec 2014 17:33:10 +0100 Subject: [PATCH] Improve documentation slighlty --- BUGS | 9 +++------ lib/check_table_access.go | 2 +- lib/global_status.go | 2 ++ lib/log.go | 1 + main.go | 2 +- version/version.go | 2 ++ 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/BUGS b/BUGS index 48e62b4..900ddf0 100644 --- a/BUGS +++ b/BUGS @@ -7,13 +7,10 @@ See also NEW_FEATURES for things which probably need adding soon. by looking at the pattern defined in the server. Currently I'm using hard-coded stuff which matches personal usage. -2. Only tested on MySQL 5.6 and MariaDB 10.0. It should be possible -to make this work on MySQL 5.7 but that has not been tested yet. - -3. Latency issues over slow connections. Perhaps should use compressed +2. Latency issues over slow connections. Perhaps should use compressed connection to speed things up? -4. Sometimes I see this: +3. Sometimes I see this: pstop 0.0.12 - 8:46:41 xxxxxxxxxxxxx / 5.6.21-log, up 1d 22h 59m 16s [ABS] Latency by Table Name (table_io_waits_summary_by_table) 239 rows @@ -31,7 +28,7 @@ xxxxxx.xxxxxxxx 15.71 s 1.6%| 99.6% 0.4% with a very long latency. Related to doing backups. Need to check the cause of the 5124.10h ++ issue. Probably a subtraction problem of some sort. -5. Fix the filename encoding for example in sys: +4. Fix the filename encoding for example in sys: sys.x@0024host_summary_by_sta 882.29 us 0.2%| 3.5% 96.5%| 100 | 30 33.3% 66.7% sys.x@0024host_summary_by_fil 861.65 us 0.2%| 3.6% 96.4%| 100 | 30 33.3% 66.7% diff --git a/lib/check_table_access.go b/lib/check_table_access.go index 3e4e8c3..6cd3b83 100644 --- a/lib/check_table_access.go +++ b/lib/check_table_access.go @@ -5,7 +5,7 @@ import ( "log" ) -// check that select to a table exists. Return an error if we get a failure. +// Check that select to a table works. Return an error if we get a failure. func CheckTableAccess(dbh *sql.DB, table_name string) error { sql_select := "SELECT 1 FROM " + table_name + " LIMIT 1" diff --git a/lib/global_status.go b/lib/global_status.go index 1bbe0b7..8c919d5 100644 --- a/lib/global_status.go +++ b/lib/global_status.go @@ -14,6 +14,8 @@ import ( * +----------------+ * 1 row in set (0.00 sec) **/ + +// return the variable value of the given variable name (if found), or if not an error func SelectGlobalStatusByVariableName(dbh *sql.DB, variable_name string) (error, int) { sql_select := "SELECT VARIABLE_VALUE from INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = ?" diff --git a/lib/log.go b/lib/log.go index 23c7c8e..a8192a5 100644 --- a/lib/log.go +++ b/lib/log.go @@ -20,6 +20,7 @@ type MyLogger struct { logger *log.Logger } +// Enable logging to the log file func (logger *MyLogger) EnableLogging(enable_logging bool) bool { if logger.logging_enabled == enable_logging { return enable_logging // as nothing to do diff --git a/main.go b/main.go index 927a151..1f40e65 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Top like progream which collects information from MySQL's +// pstop - Top like progream which collects information from MySQL's // performance_schema database. package main diff --git a/version/version.go b/version/version.go index c1fb1df..60ffa71 100644 --- a/version/version.go +++ b/version/version.go @@ -1,9 +1,11 @@ +// package to return the package version package version const ( version = "0.0.17" ) +// return the current application version func Version() string { return version } -- 2.7.4