Improve documentation slighlty
authorSimon J Mudd <sjmudd@pobox.com>
Thu, 4 Dec 2014 16:33:10 +0000 (17:33 +0100)
committerSimon J Mudd <sjmudd@pobox.com>
Thu, 4 Dec 2014 16:33:10 +0000 (17:33 +0100)
BUGS
lib/check_table_access.go
lib/global_status.go
lib/log.go
main.go
version/version.go

diff --git a/BUGS b/BUGS
index 48e62b4..900ddf0 100644 (file)
--- 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.
 
 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?
 
 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
 
 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.
 
 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%
 
 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%
index 3e4e8c3..6cd3b83 100644 (file)
@@ -5,7 +5,7 @@ import (
        "log"
 )
 
        "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"
 
 func CheckTableAccess(dbh *sql.DB, table_name string) error {
        sql_select := "SELECT 1 FROM " + table_name + " LIMIT 1"
 
index 1bbe0b7..8c919d5 100644 (file)
@@ -14,6 +14,8 @@ import (
 * +----------------+
 * 1 row in set (0.00 sec)
 **/
 * +----------------+
 * 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 = ?"
 
 func SelectGlobalStatusByVariableName(dbh *sql.DB, variable_name string) (error, int) {
        sql_select := "SELECT VARIABLE_VALUE from INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = ?"
 
index 23c7c8e..a8192a5 100644 (file)
@@ -20,6 +20,7 @@ type MyLogger struct {
        logger          *log.Logger
 }
 
        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
 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 (file)
--- 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
 
 // performance_schema database.
 package main
 
index c1fb1df..60ffa71 100644 (file)
@@ -1,9 +1,11 @@
+// package to return the package version
 package version
 
 const (
        version = "0.0.17"
 )
 
 package version
 
 const (
        version = "0.0.17"
 )
 
+// return the current application version
 func Version() string {
        return version
 }
 func Version() string {
        return version
 }