Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add giset command to set generic dictionary settings #646

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

sm-shaw
Copy link
Contributor

@sm-shaw sm-shaw commented Nov 30, 2023

Add giset command to modify generic dictionary settings and print generic to print the current settings out.
Modifications are persisted to the SQLite storage.
Update has also been made to tclpy fork to keep commands in sync sm-shaw/libtclpy@f53b1fc
Examples of usage of both commands as shown.

hammerdb>giset commandline keepalive_margin 600
Changed commandline:keepalive_margin from 10 to 600 for generic
hammerdb>print generic
Generic Dictionary Settings
theme                {
 scaling        = auto
 scaletheme     = auto
 pixelsperpoint = auto
}
sqlitedb             {
 sqlitedb_dir = TMP
}
code_highlight       {
 highlight = true
}
benchmark            {
 rdbms        = Oracle
 bm           = TPC-C
 first_result = NOPM
}
virtual_user_options {
 virtual_users   = 1
 user_delay      = 500
 repeat_delay    = 500
 iterations      = 1
 show_output     = 1
 log_to_temp     = 0
 unique_log_name = 0
 no_log_buffer   = 0
 log_timestamps  = 0
}
autopilot            {
 apmode             = disabled
 autopilot_duration = 10
 autopilot_sequence = 1 2 4 8 12 16 20 24
}
mode                 {
 hostname = localhost
 id       = 0
}
transaction_counter  {
 tc_refresh_rate    = 10
 tc_log_to_temp     = 0
 tc_unique_log_name = 0
 tc_log_timestamps  = 0
 tc_graph_ribbon    = false
}
metrics              {
 agent_hostname = localhost
 agent_id       = 0
}
datageneration       {
 gen_count_ware = 1
 gen_scale_fact = 1
 gen_num_vu     = 1
}
commandline          {
 sqlite_db        = TMP
 keepalive_margin = 600
 jobsoutput       = JSON
 jobs_disable     = 0
}
webservice           {
 ws_port = 8080
}
timeprofile          {
 profiler           = xtprof
 xt_unique_log_name = 0
 xt_gather_timeout  = 10
 xt_job_storage     = 1
}
hdb_version          {
 version = v4.9
}

@sm-shaw sm-shaw requested a review from a team as a code owner November 30, 2023 11:54
@sm-shaw sm-shaw linked an issue Nov 30, 2023 that may be closed by this pull request
@sm-shaw sm-shaw self-assigned this Nov 30, 2023
@sm-shaw sm-shaw added the enhancement New feature or request label Nov 30, 2023
@sm-shaw
Copy link
Contributor Author

sm-shaw commented Nov 30, 2023

Updated command so functionality also enabled in primary/replica mode with multiple CLI instances of HammerDB.

hammerdb>switchmode primary
Switch from Local
to Primary mode?
Enter yes or no: replied yes
Setting Primary Mode at id : 15564, hostname : CRANE
Primary Mode active at id : 15564, hostname : CRANE

hammerdb>Received a new replica connection from host 127.0.0.1
New replica joined : {15606 CRANE}

hammerdb>giset commandline keepalive_margin 900
Changed commandline:keepalive_margin from 600 to 900 for generic
---
hammerdb>switchmode replica 15564 crane
Switch from Local
to Replica mode?
Enter yes or no: replied yes
Setting Replica Mode at id : 15606, hostname : CRANE
Replica connecting to crane 15564 : Connection succeeded
Primary call back successful

hammerdb>Changed commandline:keepalive_margin from 600 to 900 for generic

@abondvt89
Copy link
Contributor

Merging after reviews and approval of the three members of the code maintenance team.

@abondvt89 abondvt89 merged commit d11822d into TPC-Council:master Nov 30, 2023
@sm-shaw sm-shaw removed their assignment Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CLI functionality to update generic dictionary settings
3 participants