import (
"database/sql"
+ "time"
- // "github.com/sjmudd/pstop/lib"
+ "github.com/sjmudd/pstop/lib"
ps "github.com/sjmudd/pstop/performance_schema"
)
}
// reset the statistics to current values
-func (t *File_summary_by_instance) UpdateInitialValues() {
+func (t *File_summary_by_instance) SyncReferenceValues() {
t.SetNow()
t.initial = make(file_summary_by_instance_rows, len(t.current))
copy(t.initial, t.current)
// Collect data from the db, then merge it in.
func (t *File_summary_by_instance) Collect(dbh *sql.DB) {
+ start := time.Now()
// UPDATE current from db handle
t.current = merge_by_table_name(select_fsbi_rows(dbh), t.global_variables)
// setup the totals
t.totals = t.results.totals()
+ lib.Logger.Println("File_summary_by_instance.Collect() took:", time.Duration(time.Since(start)).String())
}
// return the headings for a table