Skip to content

Commit

Permalink
update090417
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyd66 committed Sep 4, 2024
1 parent c56166c commit 436647b
Show file tree
Hide file tree
Showing 3 changed files with 505 additions and 9 deletions.
6 changes: 3 additions & 3 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from err import CheckStatus, SUG_SSH_FAILED
from handler.analyzer.analyze_flt_trace import AnalyzeFltTraceHandler
from handler.analyzer.analyze_log import AnalyzeLogHandler
from handler.analyzer.analyze_quene import AnalyzeQueneHandler
from handler.analyzer.analyze_queue import AnalyzeQueueHandler
from handler.analyzer.analyze_sql import AnalyzeSQLHandler
from handler.analyzer.analyze_sql_review import AnalyzeSQLReviewHandler
from handler.analyzer.analyze_parameter import AnalyzeParameterHandler
Expand Down Expand Up @@ -280,9 +280,9 @@ def analyze_fuction(self, function_type, opt):
self.set_context_skip_cluster_conn(function_type, 'analyze', config)
handler = AnalyzeLogHandler(self.context)
handler.handle()
elif function_type == 'analyze_quene':
elif function_type == 'analyze_queue':
self.set_context(function_type, 'analyze', config)
handler = AnalyzeQueneHandler(self.context)
handler = AnalyzeQueueHandler(self.context)
handler.handle()
elif function_type == 'analyze_flt_trace':
self.set_context(function_type, 'analyze', config)
Expand Down
12 changes: 6 additions & 6 deletions diag_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,21 +660,21 @@ def _do_command(self, obdiag):
return obdiag.analyze_fuction('analyze_log', self.opts)


class ObdiagAnalyzeQueneCommand(ObdiagOriginCommand):
class ObdiagAnalyzeQueueCommand(ObdiagOriginCommand):

def __init__(self):
super(ObdiagAnalyzeQueneCommand, self).__init__('quenue', 'Analyze oceanbase log from online observer machines to registration quenue')
super(ObdiagAnalyzeQueueCommand, self).__init__('queue', 'Analyze oceanbase log from online observer machines to registration queue')
self.parser.add_option('--from', type='string', help="specify the start of the time range. format: 'yyyy-mm-dd hh:mm:ss'")
self.parser.add_option('--to', type='string', help="specify the end of the time range. format: 'yyyy-mm-dd hh:mm:ss'")
self.parser.add_option('--files', action="append", type='string', help="specify files")
self.parser.add_option('--store_dir', type='string', help='the dir to store gather result, current dir by default.', default='./')
self.parser.add_option('-c', type='string', help='obdiag custom config', default=os.path.expanduser('~/.obdiag/config.yml'))
self.parser.add_option('--since', type='string', help="Specify time range that from 'n' [d]ays, 'n' [h]ours or 'n' [m]inutes. before to now. format: <n> <m|h|d>. example: 1h.", default='30m')
self.parser.add_option('--tenant', type='string', help="Specify tenantname ")
self.parser.add_option('--quenue', type='int', help="quene size ", default=50)
self.parser.add_option('--queue', type='int', help="quene size ", default=50)

def init(self, cmd, args):
super(ObdiagAnalyzeQueneCommand, self).init(cmd, args)
super(ObdiagAnalyzeQueueCommand, self).init(cmd, args)
self.parser.set_usage('%s [options]' % self.prev_cmd)
return self

Expand Down Expand Up @@ -924,7 +924,7 @@ def __init__(self):
self.register_command(ObdiagGatherTableDumpHandler())
self.register_command(ObdiagGatherParameterCommand())
self.register_command(ObdiagGatherVariableCommand())
self.register_command(ObdiagAnalyzeQueneCommand())
self.register_command(ObdiagAnalyzeQueueCommand())


class ObdiagGatherSceneCommand(MajorCommand):
Expand All @@ -945,7 +945,7 @@ def __init__(self):
self.register_command(ObdiagAnalyzeSQLReviewCommand())
self.register_command(ObdiagAnalyzeParameterCommand())
self.register_command(ObdiagAnalyzeVariableCommand())
self.register_command(ObdiagAnalyzeQueneCommand())
self.register_command(ObdiagAnalyzeQueueCommand())


class ObdiagRCACommand(MajorCommand):
Expand Down
Loading

0 comments on commit 436647b

Please sign in to comment.