<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Don&#039;t Forget to Plant It! &#187; FiveRuns TuneUp</title>
	<atom:link href="http://blog.codeeg.com/tag/fiveruns-tuneup/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codeeg.com</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 12:22:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Running FiveRuns TuneUp in a Separate Environment</title>
		<link>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/</link>
		<comments>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 01:23:24 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[FiveRuns TuneUp]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Profiling]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog2.codeeg.com/?p=168</guid>
		<description><![CDATA[FiveRuns&#8217; TuneUp is a great tool for profiling your Rails app, but by default it is always running in development. This causes two issues 1) every request is slower in development as it is always collecting profiling data, and 2) the TuneUp bar can mess with the layout of your application, especially if you&#8217;re rendering [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.fiveruns.com/products/tuneup">FiveRuns&#8217; TuneUp</a> is a great tool for profiling your Rails app, but by default it is always running in development.  This causes two issues 1) every request is slower in development as it is always collecting profiling data, and 2) the TuneUp bar can mess with the layout of your application, especially if you&#8217;re rendering content in iframes like we do with <a href="http://skribit.com">Skribit</a>.  So instead of having TuneUp always run in development mode, I&#8217;ve changed it to run only when the server is started in a new environment called &#8216;profiler&#8217;.   Here&#8217;s how I did it.</p>
<p>First, you need to tell TuneUp to only run in the profiler environment.  You do this by modifying <em>config/tuneup.rb</em> (create this file if it doesn&#8217;t already exist):</p>
<pre><code>Fiveruns::Tuneup.config do |config|
  config.environments.delete('development')
  config.environments &lt;&lt; 'profiler'
end</code></pre>
<p>Next, copy the development configuration block in <em>config/database.yml</em> and create a new block called <em>profiler</em>:</p>
<pre><code>profiler:
  adapter: mysql
  encoding: utf8
  database: YOUR_DATABASE
  username: YOUR_USERNAME
  password: YOUR_PASSWORD
  socket: /tmp/mysql.sock
</code></pre>
<p>Finally, create your profiler environment configs by copying your development configs:</p>
<pre><code>cp config/environments/development.rb config/environments/profiler.rb</code></pre>
<p>You&#8217;re all set!  Now, to run the server with TuneUp on, just run the server in the <em>profiler</em> environment:</p>
<pre><code>script/server -e profiler</code</pre>
<p>Now, I have TuneUp available to me only when I'm looking to optimize performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2008/10/05/running-fiveruns-tuneup-in-a-separate-environment/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
