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: 132 lines (+36/-26)
4 files modified
drizzle/automation/lib/options.py (+10/-10)
drizzle/automation/lib/util.py (+18/-0)
drizzle/automation/randgen/run.py (+6/-2)
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+16299@code.qastaging.launchpad.net

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 :

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 :

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 :

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...

126. By lbieber <lbieber@orisndriz05>

uncomment code I had temporarily commented out which looks to see if we are running before version 950

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
1=== modified file 'drizzle/automation/lib/options.py'
2--- drizzle/automation/lib/options.py 2009-11-24 00:07:24 +0000
3+++ drizzle/automation/lib/options.py 2009-12-18 18:06:11 +0000
4@@ -126,6 +126,13 @@
5 , help="Don't store the results in a database. [default: %default]"
6 )
7 parser.add_option(
8+ "--profiler"
9+ , metavar="PROFILER_NAME"
10+ , choices=['memcheck','callgrind','cachegrind',None]
11+ , default=None
12+ , help="The name of the profiler you want to run against the server."
13+)
14+parser.add_option(
15 "--server"
16 , choices=['drizzled','mysqld']
17 , default='drizzled'
18@@ -191,13 +198,6 @@
19 group= optparse.OptionGroup(parser, "Options when running the SYSBENCH command")
20
21 group.add_option(
22- "--sysbench-profiler"
23- , metavar="PROFILER_NAME"
24- , choices=['memcheck','callgrind','cachegrind',None]
25- , default=None
26- , help="The name of the profiler you want to run against the server."
27-)
28-group.add_option(
29 "--sysbench-config"
30 , help="SYSBENCH command only. Sets the bench configuration to run."
31 )
32@@ -353,11 +353,11 @@
33 'no_store_db',
34 'no_pull',
35 'no_build',
36- 'with_show_status',
37+ 'profiler',
38 'server',
39- 'sysbench_profiler',
40 'report_name',
41- 'with_email_report']
42+ 'with_email_report',
43+ 'with_show_status']
44 for other in others:
45 variables[other]= getattr(parser.values, other)
46
47
48=== modified file 'drizzle/automation/lib/util.py'
49--- drizzle/automation/lib/util.py 2009-11-19 22:31:59 +0000
50+++ drizzle/automation/lib/util.py 2009-12-18 18:06:11 +0000
51@@ -152,3 +152,21 @@
52
53 return True
54
55+# if we are profiling, we must stop and restart the server
56+# under the profiler now that the database is prepared
57+def get_profile_options(server, profile_option):
58+
59+ if profile_option is not None:
60+ server.stop()
61+ profiler_name= profile_option
62+ profiler_log_file= profiler_name + '.out'
63+ if profiler_name == 'memcheck':
64+ from drizzle.automation.profiler.memcheck import MemcheckProfiler as profiler_adapter
65+ elif profiler_name == 'callgrind':
66+ from drizzle.automation.profiler.callgrind import CallgrindProfiler as profiler_adapter
67+ elif profiler_name == 'cachegrind':
68+ from drizzle.automation.profiler.cachegrind import CachegrindProfiler as profiler_adapter
69+ profiler= profiler_adapter(profiler_log_file)
70+ server.setProfiler(profiler)
71+ server.start()
72+
73
74=== modified file 'drizzle/automation/randgen/run.py'
75--- drizzle/automation/randgen/run.py 2009-11-07 15:11:56 +0000
76+++ drizzle/automation/randgen/run.py 2009-12-18 18:06:11 +0000
77@@ -71,7 +71,7 @@
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
83
84 elif server_name in ['mysqld','mysql']:
85 from drizzle.automation.builder.mysqld import MySQLBzrBuilder as builder_adapter
86@@ -89,7 +89,7 @@
87 try:
88 configure_options= variables['defaults']['configure_options']
89 except KeyError:
90- configure_options= ""
91+ configure_options= "--with-debug"
92
93 try:
94 make_options= variables['defaults']['make_options']
95@@ -115,6 +115,10 @@
96 server.stop()
97 sys.exit(1)
98
99+ # If we are profiling, we must now stop and restart the server
100+ # under the profiler now that the database is prepared
101+ util.get_profile_options(server,variables['profiler'])
102+
103 # change to the randgen repository to run the tests
104 os.chdir(randgen_home)
105
106
107=== modified file 'drizzle/automation/sysbench/run.py'
108--- drizzle/automation/sysbench/run.py 2009-11-17 18:33:55 +0000
109+++ drizzle/automation/sysbench/run.py 2009-12-18 18:06:11 +0000
110@@ -382,20 +382,8 @@
111 sys.exit(1)
112
113 # If we are profiling, we must now stop and restart the server
114- # under the profiler now that the benchmark database is prepared
115- if variables['sysbench_profiler'] is not None:
116- server.stop()
117- profiler_name= variables['sysbench_profiler']
118- profiler_log_file= profiler_name + '.out'
119- if profiler_name == 'memcheck':
120- from drizzle.automation.profiler.memcheck import MemcheckProfiler as profiler_adapter
121- elif profiler_name == 'callgrind':
122- from drizzle.automation.profiler.callgrind import CallgrindProfiler as profiler_adapter
123- elif profiler_name == 'cachegrind':
124- from drizzle.automation.profiler.cachegrind import CachegrindProfiler as profiler_adapter
125- profiler= profiler_adapter(profiler_log_file)
126- server.setProfiler(profiler)
127- server.start()
128+ # under the profiler now that the database is prepared
129+ util.get_profile_options(server,variables['profiler'])
130
131 concurrency_levels= sysbench.getConcurrencyLevels()
132 iterations= sysbench.getIterations()

Subscribers

People subscribed via source and target branches

to all changes: