Skip to content

Commit

Permalink
Version 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-shaw committed Sep 30, 2018
1 parent 9f3e9c9 commit e220d27
Show file tree
Hide file tree
Showing 31 changed files with 3,679 additions and 71 deletions.
19 changes: 17 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -843,5 +843,20 @@ Modified Oracle SLEV stored procedure to return Stock Count

Updated transaction counter display and improved calibration of output data

Deprecated Trafodion support can be uncommented in database.xml to enable
unsupported
Deprecated Trafodion support can be uncommented in database.xml to enable unsupported

---------------------------------------------------------------------

Version 3.1 Oct 2018

Bug fixes

[#125] Microsoft VCRUNTIME140.dll missing in HammerDB v3.0
[#126] SQL Server reports TPM=0 as transaction count exceeds 32-bit integer
[#127] Transaction Counter Refresh Value not detected from XML config
[#128] PostgreSQL result handle leak in TPC-C from intentional 1% error
[#129] User Delay and Repeat Delay Crossed in XML and GUI
[#130] Unknown -under option in console
[#131] Duplicate Files with incorrect prefix in MySQL and Redis Directories

Added Oracle Database Metrics based on Ashmon by Kyle Hailey, used with permission to add as GPLv3
2 changes: 1 addition & 1 deletion agent/agent
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace import comm::*
interp recursionlimit {} 3000
global agentlist S iswin
set iswin "false"
set version 3.0
set version 3.1

if {$tcl_platform(platform) == "windows"} {
package require twapi
Expand Down
4 changes: 2 additions & 2 deletions hammerdb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exit
# License along with this program; If not, see <https://www.gnu.org/licenses/>
########################################################################
global hdb_version
set hdb_version "v3.0"
set hdb_version "v3.1"
set mainGeometry +10+10
set UserDefaultDir [ file dirname [ info script ] ]
::tcl::tm::path add "$UserDefaultDir/modules"
Expand Down Expand Up @@ -158,7 +158,7 @@ if [info exist env(Load_List)] {
}
}
append modulelist { Thread msgcat tablelist_tile tooltip tkcon xml xscale ctext comm emu_graph socktest }
append modulelist { Thread msgcat tablelist_tile tooltip tkcon xml xscale ctext comm emu_graph socktest tkblt }
set loadtext "Loading hammerdb modules"
after 100
Expand Down
2 changes: 1 addition & 1 deletion hammerdbcli
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exec ./bin/tclsh8.6 "$0" ${1+"$@"}
# License along with this program; If not, see <https://www.gnu.org/licenses/>
########################################################################
global hdb_version
set hdb_version "v3.0"
set hdb_version "v3.1"
puts "HammerDB CLI $hdb_version"
puts "Copyright (C) 2003-2018 Steve Shaw"
puts "Type \"help\" for a list of commands"
Expand Down
20 changes: 10 additions & 10 deletions modules/tkcon-2.4.tm
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,9 @@ proc ::tkcon::EvalCmd {w cmd} {
set tag [UniqueTag $w]
$w insert output $res [list stderr $tag] \n stderr
$w tag bind $tag <Enter> \
[list $w tag configure $tag -under 1]
[list $w tag configure $tag -underline 1]
$w tag bind $tag <Leave> \
[list $w tag configure $tag -under 0]
[list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> \
"if {!\[info exists tkPriv(mouseMoved)\] || !\$tkPriv(mouseMoved)} \
{[list $OPT(edit) -attach [Attach] -type error -- $PRIV(errorInfo)]}"
Expand Down Expand Up @@ -2830,8 +2830,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $start+${c0}c $start+1c+${c1}c
$w tag configure $tag -foreground $COLOR(stdout)
$w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
$w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
$w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
$w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list $OPT(edit) -attach $app -type proc -find $what -- $cmd]}"
}
Expand Down Expand Up @@ -2859,8 +2859,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $ix+1c $start
$w tag configure $tag -foreground $COLOR(proc)
$w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
$w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
$w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
$w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list $OPT(edit) -attach $app -type proc -- $cmd]}"
}
Expand Down Expand Up @@ -3656,14 +3656,14 @@ proc edit {args} {
##
set text $w.text
set m [menu [::tkcon::MenuButton $menu Edit edit]]
$m add command -label "Cut" -under 2 \
$m add command -label "Cut" -underline 2 \
-command [list tk_textCut $text]
$m add command -label "Copy" -under 0 \
$m add command -label "Copy" -underline 0 \
-command [list tk_textCopy $text]
$m add command -label "Paste" -under 0 \
$m add command -label "Paste" -underline 0 \
-command [list tk_textPaste $text]
$m add separator
$m add command -label "Find" -under 0 \
$m add command -label "Find" -underline 0 \
-command [list ::tkcon::FindBox $text]

## Send To Menu
Expand Down
6 changes: 6 additions & 0 deletions modules/tpcccommon-1.0.tm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ set allthreads [ lreplace $allthreads $idx $idx ]
}
}
}
if {![catch {set monitorthread [ tsv::get application themonitor ]}]} {
set idx [lsearch -exact $allthreads $monitorthread]
if { $idx != -1 } {
set allthreads [ lreplace $allthreads $idx $idx ]
}
}
set totalvirtualusers [llength $allthreads]
set myposition [ expr $totalvirtualusers - [lsearch -exact $allthreads $mythread]]
return [ list $myposition $totalvirtualusers ]
Expand Down
6 changes: 6 additions & 0 deletions modules/tpchcommon-1.0.tm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ set allthreads [ lreplace $allthreads $idx $idx ]
}
}
}
if {![catch {set monitorthread [ tsv::get application themonitor ]}]} {
set idx [lsearch -exact $allthreads $monitorthread]
if { $idx != -1 } {
set allthreads [ lreplace $allthreads $idx $idx ]
}
}
set totalvirtualusers [llength $allthreads]
set myposition [ expr $totalvirtualusers - [lsearch -exact $allthreads $mythread]]
return [ list $myposition $totalvirtualusers ]
Expand Down
2 changes: 1 addition & 1 deletion readme
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
HammerDB v3.0
HammerDB v3.1
Copyright (C) 2003-2018 Steve Shaw
Contact information and documentation at: http://www.hammerdb.com
1 change: 1 addition & 0 deletions src/db2/db2met.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#database metrics
4 changes: 2 additions & 2 deletions src/db2/db2opt.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ copyfieldstoconfig configdb2 [ subst $db2optsfields ] tpcc
unset db2optsfields
if { ($interval >= 60) || ($interval <= 0) } { tk_messageBox -message "Refresh rate must be more than 0 secs and less than 60 secs"
set interval 10 } else {
dict set genericdict settings refresh_rate [.countopt.f1.e4 get]
dict set genericdict transaction_counter refresh_rate [.countopt.f1.e4 get]
}
destroy .countopt
catch "destroy .tc"
Expand All @@ -99,7 +99,7 @@ copyfieldstoconfig configdb2 [ subst $db2optsfields ] tpch
unset db2optsfields
if { ($interval >= 60) || ($interval <= 0) } { tk_messageBox -message "Refresh rate must be more than 0 secs and less than 60 secs"
set interval 10 } else {
dict set genericdict settings refresh_rate [.countopt.f1.e4 get]
dict set genericdict transaction_counter refresh_rate [.countopt.f1.e4 get]
}
destroy .countopt
catch "destroy .tc"
Expand Down
2 changes: 1 addition & 1 deletion src/generic/gencli.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ break

proc help { args } {
if {[ llength $args ] != 1} {
puts "HammerDB v3.0 CLI Help Index\n
puts "HammerDB v3.1 CLI Help Index\n
Type \"help command\" for more details on specific commands below"
puts {
buildschema
Expand Down
41 changes: 29 additions & 12 deletions src/generic/gened.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ $Name tag bind dgstart <Double-ButtonPress-1> { if { ![ string match [ .ed_mainF

proc ed_stop_gui {} {
ed_wait_if_blocked
#close outstanding threads
set thlist [ thread::names ]
foreach ij $thlist {
catch {thread::cancel $ij}
#can only be used before final application exit
catch {thread::exit $ij}
}
exit
}

Expand Down Expand Up @@ -1648,14 +1655,14 @@ grid $Prompt -column 1 -row 0 -sticky w
set Name $Parent.f1.e2
set Prompt $Parent.f1.p2
ttk::label $Prompt -text "User Delay(ms) :"
ttk::entry $Name -width 30 -textvariable conpause
ttk::entry $Name -width 30 -textvariable delayms
grid $Prompt -column 0 -row 2 -sticky e
grid $Name -column 1 -row 2 -sticky ew

set Name $Parent.f1.e3
set Prompt $Parent.f1.p3
ttk::label $Prompt -text "Repeat Delay(ms) :"
ttk::entry $Name -width 30 -textvariable delayms
ttk::entry $Name -width 30 -textvariable conpause
grid $Prompt -column 0 -row 3 -sticky e
grid $Name -column 1 -row 3 -sticky ew

Expand Down Expand Up @@ -1779,21 +1786,21 @@ set timedwkl "false"
set maxvuser $virtual_users
}
}
set conpause [.vuserop.f1.e2 get]
if { ![string is integer -strict $conpause] } {
set delayms [.vuserop.f1.e2 get]
if { ![string is integer -strict $delayms] } {
tk_messageBox -message "Delay between users logons must be an integer"
set conpause 0
set delayms 0
}
if { $conpause < 0 } { tk_messageBox -message "Delay between users logons must be at least 0 milliseconds"
set conpause 0
if { $delayms < 0 } { tk_messageBox -message "Delay between users logons must be at least 0 milliseconds"
set delayms 0
}
set delayms [.vuserop.f1.e3 get]
if { ![string is integer -strict $delayms] } {
set conpause [.vuserop.f1.e3 get]
if { ![string is integer -strict $conpause] } {
tk_messageBox -message "Delay between iterations must be an integer"
set delayms 0
set conpause 0
}
if { $delayms < 0 } { tk_messageBox -message "Delay between iterations must be at least 0 milliseconds"
set delayms 0
if { $conpause < 0 } { tk_messageBox -message "Delay between iterations must be at least 0 milliseconds"
set conpause 0
}
set ntimes [.vuserop.f1.e4 get]
if { ![string is integer -strict $ntimes] } {
Expand Down Expand Up @@ -2574,6 +2581,16 @@ if { $apmode eq "enabled" } {
}

proc metricsopts {} {
#Introduced new option for Database metrics initially Oracle only
global rdbms
if { $rdbms eq "Oracle" } {
metoraopts
} else {
metgenopts
}
}

proc metgenopts {} {
global agent_hostname agent_id
upvar #0 icons icons
if { [ info exists agent_hostname ] } { ; } else { set agent_hostname "localhost" }
Expand Down
2 changes: 1 addition & 1 deletion src/generic/geninit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ foreach { key } [ dict keys $dbdict ] {
set dictname config$key
set $dictname [ xml_to_dict config/$key.xml ]
set prefix [ dict get $dbdict $key prefix ]
lappend dbsrclist "$key/$prefix\opt.tcl" "$key/$prefix\oltp.tcl" "$key/$prefix\olap.tcl" "$key/$prefix\otc.tcl"
lappend dbsrclist "$key/$prefix\opt.tcl" "$key/$prefix\oltp.tcl" "$key/$prefix\olap.tcl" "$key/$prefix\otc.tcl" "$key/$prefix\met.tcl"
}
#Get generic config data
set genericdict [ xml_to_dict config/generic.xml ]
Expand Down
Loading

0 comments on commit e220d27

Please sign in to comment.