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
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 19:22: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 19:22: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 19:22:11 +0000
77@@ -89,7 +89,7 @@
78 try:
79 configure_options= variables['defaults']['configure_options']
80 except KeyError:
81- configure_options= ""
82+ configure_options= "--with-debug"
83
84 try:
85 make_options= variables['defaults']['make_options']
86@@ -115,6 +115,10 @@
87 server.stop()
88 sys.exit(1)
89
90+ # If we are profiling, we must now stop and restart the server
91+ # under the profiler now that the database is prepared
92+ util.get_profile_options(server,variables['profiler'])
93+
94 # change to the randgen repository to run the tests
95 os.chdir(randgen_home)
96
97
98=== modified file 'drizzle/automation/sysbench/run.py'
99--- drizzle/automation/sysbench/run.py 2009-11-17 18:33:55 +0000
100+++ drizzle/automation/sysbench/run.py 2009-12-18 19:22:11 +0000
101@@ -382,20 +382,8 @@
102 sys.exit(1)
103
104 # If we are profiling, we must now stop and restart the server
105- # under the profiler now that the benchmark database is prepared
106- if variables['sysbench_profiler'] is not None:
107- server.stop()
108- profiler_name= variables['sysbench_profiler']
109- profiler_log_file= profiler_name + '.out'
110- if profiler_name == 'memcheck':
111- from drizzle.automation.profiler.memcheck import MemcheckProfiler as profiler_adapter
112- elif profiler_name == 'callgrind':
113- from drizzle.automation.profiler.callgrind import CallgrindProfiler as profiler_adapter
114- elif profiler_name == 'cachegrind':
115- from drizzle.automation.profiler.cachegrind import CachegrindProfiler as profiler_adapter
116- profiler= profiler_adapter(profiler_log_file)
117- server.setProfiler(profiler)
118- server.start()
119+ # under the profiler now that the database is prepared
120+ util.get_profile_options(server,variables['profiler'])
121
122 concurrency_levels= sysbench.getConcurrencyLevels()
123 iterations= sysbench.getIterations()

Subscribers

People subscribed via source and target branches

to all changes: