Merge lp://qastaging/~kalebral-deactivatedaccount/drizzle-automation/move-profile-option into lp://qastaging/drizzle-automation

Proposed by Lee Bieber
Status: Superseded
Proposed branch: lp://qastaging/~kalebral-deactivatedaccount/drizzle-automation/move-profile-option
Merge into: lp://qastaging/drizzle-automation
Diff against target: 123 lines (+35/-25)
4 files modified
drizzle/automation/lib/options.py (+10/-10)
drizzle/automation/lib/util.py (+18/-0)
drizzle/automation/randgen/run.py (+5/-1)
drizzle/automation/sysbench/run.py (+2/-14)
To merge this branch: bzr merge lp://qastaging/~kalebral-deactivatedaccount/drizzle-automation/move-profile-option
Reviewer Review Type Date Requested Status
Jay Pipes Needs Fixing
Review via email: mp+16344@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2009-12-17.

This proposal has been superseded by a proposal from 2009-12-18.

To post a comment you must log in.
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote : Posted in a previous version of this proposal

move --sysbench-profile option to --profile so all benchmarks can use the option. Made it a generic option in the lib/util and added it to randgen

Revision history for this message
Jay Pipes (jaypipes) wrote : Posted in a previous version of this proposal

Hi Lee! Mostly good stuff, just one little thing to fix:

85 + #if str(variables['bzr_revision']) != 'last:1' and int(variables['bzr_revision']) < 950:
86 + # from drizzle.automation.server.olddrizzled import DrizzledServer as server_adapter
87 + #else:
88 + from drizzle.automation.server.drizzled import DrizzledServer as server_adapter

This will break building Drizzle if we run with revision 949 or less, which is when our build system significantly changed. Could you please uncomment that back again? Thanks!

Jay

review: Needs Fixing
Revision history for this message
Jay Pipes (jaypipes) wrote : Posted in a previous version of this proposal

Also, in case it's not clear why we'd want to bench rev 949 or less, we may install automation on a new server and want to see the full benchmarks for all revisions...

Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi!

OK, so I believe you need to look at the following:

78 if str(variables['bzr_revision']) != 'last:1' and int(variables['bzr_revision']) < 950:
79 from drizzle.automation.server.olddrizzled import DrizzledServer as server_adapter
80 else:
81 - from drizzle.automation.server.drizzled import DrizzledServer as server_adapter
82 + from drizzle.automation.server.drizzled import DrizzledServer as server_adapter

Notice that line 82 is not indented properly, and this will be a compile error when python compiles the file...

Tough sometimes to see in an editor. Easy in the visual diff :)

review: Needs Fixing
127. By lbieber <lbieber@orisndriz05>

idiot mistake! shows that I didn't test this. Fixed indenting

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'drizzle/automation/lib/options.py'
--- drizzle/automation/lib/options.py 2009-11-24 00:07:24 +0000
+++ drizzle/automation/lib/options.py 2009-12-18 19:22:11 +0000
@@ -126,6 +126,13 @@
126 , help="Don't store the results in a database. [default: %default]"126 , help="Don't store the results in a database. [default: %default]"
127 )127 )
128parser.add_option(128parser.add_option(
129 "--profiler"
130 , metavar="PROFILER_NAME"
131 , choices=['memcheck','callgrind','cachegrind',None]
132 , default=None
133 , help="The name of the profiler you want to run against the server."
134)
135parser.add_option(
129 "--server"136 "--server"
130 , choices=['drizzled','mysqld']137 , choices=['drizzled','mysqld']
131 , default='drizzled'138 , default='drizzled'
@@ -191,13 +198,6 @@
191group= optparse.OptionGroup(parser, "Options when running the SYSBENCH command")198group= optparse.OptionGroup(parser, "Options when running the SYSBENCH command")
192199
193group.add_option(200group.add_option(
194 "--sysbench-profiler"
195 , metavar="PROFILER_NAME"
196 , choices=['memcheck','callgrind','cachegrind',None]
197 , default=None
198 , help="The name of the profiler you want to run against the server."
199)
200group.add_option(
201 "--sysbench-config"201 "--sysbench-config"
202 , help="SYSBENCH command only. Sets the bench configuration to run."202 , help="SYSBENCH command only. Sets the bench configuration to run."
203 )203 )
@@ -353,11 +353,11 @@
353 'no_store_db',353 'no_store_db',
354 'no_pull',354 'no_pull',
355 'no_build',355 'no_build',
356 'with_show_status',356 'profiler',
357 'server',357 'server',
358 'sysbench_profiler',
359 'report_name',358 'report_name',
360 'with_email_report']359 'with_email_report',
360 'with_show_status']
361 for other in others:361 for other in others:
362 variables[other]= getattr(parser.values, other)362 variables[other]= getattr(parser.values, other)
363363
364364
=== modified file 'drizzle/automation/lib/util.py'
--- drizzle/automation/lib/util.py 2009-11-19 22:31:59 +0000
+++ drizzle/automation/lib/util.py 2009-12-18 19:22:11 +0000
@@ -152,3 +152,21 @@
152152
153 return True153 return True
154154
155# if we are profiling, we must stop and restart the server
156# under the profiler now that the database is prepared
157def get_profile_options(server, profile_option):
158
159 if profile_option is not None:
160 server.stop()
161 profiler_name= profile_option
162 profiler_log_file= profiler_name + '.out'
163 if profiler_name == 'memcheck':
164 from drizzle.automation.profiler.memcheck import MemcheckProfiler as profiler_adapter
165 elif profiler_name == 'callgrind':
166 from drizzle.automation.profiler.callgrind import CallgrindProfiler as profiler_adapter
167 elif profiler_name == 'cachegrind':
168 from drizzle.automation.profiler.cachegrind import CachegrindProfiler as profiler_adapter
169 profiler= profiler_adapter(profiler_log_file)
170 server.setProfiler(profiler)
171 server.start()
172
155173
=== modified file 'drizzle/automation/randgen/run.py'
--- drizzle/automation/randgen/run.py 2009-11-07 15:11:56 +0000
+++ drizzle/automation/randgen/run.py 2009-12-18 19:22:11 +0000
@@ -89,7 +89,7 @@
89 try:89 try:
90 configure_options= variables['defaults']['configure_options']90 configure_options= variables['defaults']['configure_options']
91 except KeyError:91 except KeyError:
92 configure_options= ""92 configure_options= "--with-debug"
9393
94 try:94 try:
95 make_options= variables['defaults']['make_options']95 make_options= variables['defaults']['make_options']
@@ -115,6 +115,10 @@
115 server.stop()115 server.stop()
116 sys.exit(1)116 sys.exit(1)
117117
118 # If we are profiling, we must now stop and restart the server
119 # under the profiler now that the database is prepared
120 util.get_profile_options(server,variables['profiler'])
121
118 # change to the randgen repository to run the tests122 # change to the randgen repository to run the tests
119 os.chdir(randgen_home)123 os.chdir(randgen_home)
120124
121125
=== modified file 'drizzle/automation/sysbench/run.py'
--- drizzle/automation/sysbench/run.py 2009-11-17 18:33:55 +0000
+++ drizzle/automation/sysbench/run.py 2009-12-18 19:22:11 +0000
@@ -382,20 +382,8 @@
382 sys.exit(1)382 sys.exit(1)
383383
384 # If we are profiling, we must now stop and restart the server384 # If we are profiling, we must now stop and restart the server
385 # under the profiler now that the benchmark database is prepared385 # under the profiler now that the database is prepared
386 if variables['sysbench_profiler'] is not None:386 util.get_profile_options(server,variables['profiler'])
387 server.stop()
388 profiler_name= variables['sysbench_profiler']
389 profiler_log_file= profiler_name + '.out'
390 if profiler_name == 'memcheck':
391 from drizzle.automation.profiler.memcheck import MemcheckProfiler as profiler_adapter
392 elif profiler_name == 'callgrind':
393 from drizzle.automation.profiler.callgrind import CallgrindProfiler as profiler_adapter
394 elif profiler_name == 'cachegrind':
395 from drizzle.automation.profiler.cachegrind import CachegrindProfiler as profiler_adapter
396 profiler= profiler_adapter(profiler_log_file)
397 server.setProfiler(profiler)
398 server.start()
399387
400 concurrency_levels= sysbench.getConcurrencyLevels()388 concurrency_levels= sysbench.getConcurrencyLevels()
401 iterations= sysbench.getIterations()389 iterations= sysbench.getIterations()

Subscribers

People subscribed via source and target branches

to all changes: