<?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>New Relic blog</title>
	<atom:link href="http://blog.newrelic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.newrelic.com</link>
	<description>Application Performance Management</description>
	<lastBuildDate>Tue, 18 Jun 2013 19:45:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Get Up to Speed at Velocity</title>
		<link>http://blog.newrelic.com/2013/06/17/velocity-2013-new-relic/</link>
		<comments>http://blog.newrelic.com/2013/06/17/velocity-2013-new-relic/#comments</comments>
		<pubDate>Tue, 18 Jun 2013 00:00:00 +0000</pubDate>
		<dc:creator>Leigh Shevchik</dc:creator>
				<category><![CDATA[Company News]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13079</guid>
		<description><![CDATA[<p>Last year&#8217;s Velocity conference was amazing, so naturally New Relic is participating again this year. This gathering features some of the most knowledgable experts in web performance. Once again, we&#8217;ll kick off the event with an &#8216;Optimized Breakfast&#8216; on Tuesday morning (June 18) with our COO Chris Cook, where you can hear company news and meet [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/17/velocity-2013-new-relic/">Get Up to Speed at Velocity</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Last year&#8217;s <a href="http://velocityconf.com/velocity2013/public/content/home" target="_blank">Velocity</a> conference was amazing, so naturally New Relic is participating again this year. This gathering features some of the most knowledgable experts in web performance.</p>
<p><a title="Velocity 2013" href="http://blog.newrelic.com/wp-content/uploads/event-velocity-2013.png" target="_blank"><img class=" wp-image-13080 alignright" style="margin: 15px;" title="Velocity 2013" alt="Velocity 2013" src="http://blog.newrelic.com/wp-content/uploads/event-velocity-2013.png" width="190" height="140" /></a></p>
<p>Once again, we&#8217;ll kick off the event with an &#8216;<a title="Optimized Breakfast sign up" href="http://velocity2013-breakfast.eventbrite.com" target="_blank">Optimized Breakfast</a>&#8216; on Tuesday morning (June 18) with our COO Chris Cook, where you can hear company news and meet the New Relic team. Sign up <a title="Eventbrite breakfast with Chris Cook" href="http://velocity2013-breakfast.eventbrite.com" target="_blank">here</a> — seats are limited. If you&#8217;re not an early riser, then come network with us at our happy hour from 6:30-9pm Wednesday in our room at the convention center!</p>
<p>Then, join us for <a title="Velocity 2013 Office Hours" href="http://velocityconf.com/velocity2013/public/content/office-hours?imm_mid=0aa4e6&amp;cmp=em-velocity-vl13-office-hours" target="_blank">Office Hours</a> on Wednesday. Meet New Relic&#8217;s Senior Director of Product Management <a title="Patrick Lightbody at Velocity 2013" href="http://velocityconf.com/velocity2013/public/schedule/detail/30546" target="_blank">Patrick Lightbody</a> and Software Development Lead <a title="Bill Kayser" href="http://velocityconf.com/velocity2013/public/schedule/speaker/61265" target="_blank">Bill Kayser</a> at 1:15pm in Exhibit Hall 1. This is a great opportunity to talk with them about visualization techniques. <a title="Click the button on the Office Hours page to sign up" href="http://velocityconf.com/velocity2013/public/content/office-hours?imm_mid=0aa4e6&amp;cmp=em-velocity-vl13-office-hours" target="_blank">Sign up now</a> to make sure you get in!</p>
<p>And don&#8217;t miss our presentations! Here&#8217;s the lineup of what we have in store for you.</p>
<p>* Tuesday, June 18 – &#8216;<a title="Description of Choose Your Weapon presentation at Velocity" href="http://velocityconf.com/velocity2013/public/schedule/detail/28445" target="_blank">Choose Your Weapon: A Survey for Different Visualizations of Performance Data</a>&#8216; with New Relic&#8217;s Bill Kayser and Patrick Lightbody<br />
* Thursday, June 20 (10:30am) – &#8216;<a title="details on Velocity website" href="http://velocityconf.com/velocity2013/public/schedule/detail/30019" target="_blank">It&#8217;s 10pm. Do you know where your code is?</a>&#8216; with Patrick Lightbody.<br />
* Thursday, June 20 (2pm) — &#8216;<a title="Info on Velocity site" href="http://velocityconf.com/velocity2013/public/schedule/detail/30333" target="_blank">Surveying the RUM Landscape</a>&#8216; with Patrick Lightbody (New Relic), Ilya Grigorik (Google), Buddy Brewer (SOASTA), and Jon Fox (Torbit).</p>
<p>For a full <a href="http://velocityconf.com/velocity2013/public/schedule/grid/public-grid" target="_blank">program list,</a> see the Velocity site.</p>
<p>It&#8217;s not too late to <a title="Buy conference tickets" href="https://en.oreilly.com/velocity2013/public/register" target="_blank">get your ticket</a> – join us at the Hyatt Regency in Santa Clara, CA. We&#8217;ll be at booth #309. We look forward to seeing you there! Come get your Nerd Life t-shirt and don&#8217;t forget: <a href="http://newrelic.com/velocity" target="_blank">conference participants</a> can get our New Relic Pro free for 30 days.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/17/velocity-2013-new-relic/">Get Up to Speed at Velocity</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/17/velocity-2013-new-relic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Developer? We&#8217;ve Got a Special Treat For You</title>
		<link>http://blog.newrelic.com/2013/06/14/new-relic-goodness-for-android-developers/</link>
		<comments>http://blog.newrelic.com/2013/06/14/new-relic-goodness-for-android-developers/#comments</comments>
		<pubDate>Fri, 14 Jun 2013 15:11:10 +0000</pubDate>
		<dc:creator>Anusha Sethuraman</dc:creator>
				<category><![CDATA[Company News]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Top Post]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13069</guid>
		<description><![CDATA[<p>If you&#8217;re an Android Developer, we&#8217;ve got some exciting news for you. New Relic for Mobile Apps now supports Ant, Maven, Eclipse and Google&#8217;s latest Android build system, Gradle. (Yes, for real!) And, as an added bonus, we streamlined the Ant install process for you as well. Lots of optimization goodness for all you Android developers! It’s [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/14/new-relic-goodness-for-android-developers/">Android Developer? We&#8217;ve Got a Special Treat For You</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;re an Android Developer, we&#8217;ve got some exciting news for you. New Relic for Mobile Apps now supports Ant, Maven, Eclipse and Google&#8217;s latest Android build system, <a href="http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/">Gradle</a>. (Yes, for real!) And, as an added bonus, we streamlined the Ant install process for you as well. Lots of optimization goodness for all you Android developers!</p>
<p style="text-align: center;"><a title="Ant, Eclipse, Maven &amp; Gradle" href="http://blog.newrelic.com/wp-content/uploads/android_logos.png" target="_blank"><img class="aligncenter  wp-image-13075" title="Ant, Eclipse, Maven &amp; Gradle" alt="Ant, Eclipse, Maven &amp; Gradle" src="http://blog.newrelic.com/wp-content/uploads/android_logos.png" width="275" height="203" /></a></p>
<p>It’s super easy to get started:</p>
<p style="padding-left: 30px;">* Install New Relic using your standard build tools and processes<br />
* Debug and release your app in Eclipse just like always<br />
* Build your Maven app with New Relic &#8211; it&#8217;s now as simple as adding a dependency to your application’s pom.xml<br />
* Launch the emulator and see your New Relic data<br />
* Enjoy New Relic support for your shiny new application!</p>
<p>You’ll find separate <a title="New Relic Android support installation instructions" href="https://newrelic.com/docs/mobile-apps/android-installation-and-configuration" target="_blank">installation instructions</a> for Ant, Eclipse, Maven and Gradle in our docs section.  And don’t miss our previous blog post on <a title="New Relic blog post on Gradle" href="http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/" target="_blank">getting started with Gradle</a>. For an example of how to install Eclipse, see this install video:</p>
<p><iframe name="wistia_embed" src="https://fast.wistia.net/embed/iframe/8emkcs2ydo?endVideoBehavior=reset&amp;playButton=false&amp;playerColor=4cb0bd&amp;version=v1&amp;videoHeight=440&amp;videoWidth=550&amp;volumeControl=true" height="440" width="550" frameborder="0" scrolling="no"></iframe></p>
<p>Don’t wait — log in, deploy and see data like you never have before on <a title="See your New Relic data" href="http://rpm.newrelic.com" target="_blank">New Relic’s mobile section</a>.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/14/new-relic-goodness-for-android-developers/">Android Developer? We&#8217;ve Got a Special Treat For You</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/14/new-relic-goodness-for-android-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Case Study: Unwired Revolution Gains Full Visibility into Enterprise Environments with New Relic</title>
		<link>http://blog.newrelic.com/2013/06/12/case-study-unwired-revolution-gains-full-visibility-into-enterprise-environments-with-new-relic/</link>
		<comments>http://blog.newrelic.com/2013/06/12/case-study-unwired-revolution-gains-full-visibility-into-enterprise-environments-with-new-relic/#comments</comments>
		<pubDate>Wed, 12 Jun 2013 17:39:00 +0000</pubDate>
		<dc:creator>Leigh Shevchik</dc:creator>
				<category><![CDATA[Case Study]]></category>
		<category><![CDATA[Company News]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13059</guid>
		<description><![CDATA[<p>In the world of enterprise mobile apps, user experience is sometimes a secondary consideration. And Unwired Revolution is looking to change that, one client at a time. The company is a mobile solutions integrator specializing in security, management, support, connectivity, and application enablement for enterprise mobile initiatives across all major industries. It has turned much [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/12/case-study-unwired-revolution-gains-full-visibility-into-enterprise-environments-with-new-relic/">Case Study: Unwired Revolution Gains Full Visibility into Enterprise Environments with New Relic</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In the world of enterprise mobile apps, user experience is sometimes a secondary consideration. And <a title="Unwired Revolution" href="http://www.unwiredrevolution.com/" target="_blank">Unwired Revolution</a> is looking to change that, one client at a time. The company is a mobile solutions integrator specializing in security, management, support, connectivity, and application enablement for enterprise mobile initiatives across all major industries. It has turned much of its focus towards the development of custom apps that help clients’ internal teams collaborate more productively and effectively.</p>
<p><a title="Unwired Revolution logo" href="http://blog.newrelic.com/wp-content/uploads/unwiredrevolution_logo.png" target="_blank"><img class="alignright  wp-image-13061" style="margin-left: 5px; margin-right: 5px;" title="Unwired Revolution logo" alt="Unwired Revolution logo" src="http://blog.newrelic.com/wp-content/uploads/unwiredrevolution_logo.png" width="152" height="90" /></a>“When we design apps, one of our top priorities is to make the experience fun, fast and simple,” says <a title="Matt Vlasch on Twitter" href="https://twitter.com/mattvlasach" target="_blank">Matt Vlasach</a>, Director of Mobile Integration Services at Unwired Revolution. “There’s no better way to encourage widespread enterprise adoption than to make an app genuinely enjoyable to use.”</p>
<p><span style="font-size: 1.25em;"><strong>Helping Clients Collaborate More Effictively</strong></span><br />
For one client — a major player in the food and beverage industry — Unwired Revolution designed <a title="Unwired Revolution DocLink" href="http://www.unwiredrevolution.com/doclink/" target="_blank">DocLink</a>, a software solution for accessing enterprise content on iOS devices and Windows 7 desktops. With this app, salespeople and other mobile employees can access files and auto-generated reports stored on enterprise servers through a common and very secure RESTful API. Users can subscribe to content they find interesting and that content is then automatically synced to their mobile devices for offline availability.</p>
<p>Another client — a major utility — needed an app to make mobile device management (MDM) a more user-friendly process. Unwired Revolution made it easier for the company to manage devices and maintain security posture without exposing thousands of end users to a complicated ERP backend. “In both of these engagements, we wanted to enable seamless functionality for enterprise users in an attractive, intuitive UI,” says Vlasach. “The ultimate goal was to unleash more productivity by transforming difficult, inefficient processes into engaging work experiences.”</p>
<p><span style="font-size: 1.25em;"><strong>Solving Their Own Performance Issues</strong></span><br />
But an app can only engage users if it performs as expected. During test phases for client projects, Unwired Revolution often had its own share of performance hiccups. “At one point, a pilot end user reported an increase in ‘server errors,’ but we couldn’t identify the source of the problem or reproduce it,” says Vlasach. “Our only option was to review log files and debug traces, which is hardly an efficient use of developers’ time. Besides, we didn’t want to burden our clients with the task of troubleshooting. Our goal is to be proactive — to identify problems before our end users even know that something’s wrong.”</p>
<p>Vlasach was already familiar with New Relic before bringing it to Unwired Revolution. In fact, he’d been using the solution for apps in his side business for nearly a year. “From my own experience, I knew that New Relic could help us address our app performance issues and give us early warning of issues,” he says. “We installed it on our production servers in February 2013, and right away it gave us deeper insight into any errors we encountered going forward.”</p>
<p style="text-align: center;"><a href="http://blog.newrelic.com/wp-content/uploads/unwired_revolution_screenshot.png"><img class="aligncenter  wp-image-13060" title="Unwired Revolution" alt="Unwired Revolution" src="http://blog.newrelic.com/wp-content/uploads/unwired_revolution_screenshot.png" width="596" height="272" /></a></p>
<p><span style="font-size: 1.25em;"><strong>Server Side &amp; Mobile Monitoring</strong></span><br />
Server Monitoring was just the beginning. Vlasch and his team began using New Relic for Mobile Apps as soon as it became available. It immediately gave them greater insight into their mobile app performance. “We got the Mobile iOS SDK up and running in literally five minutes, and we were getting valuable information right away,” he says. “It was amazingly simple: just insert two lines of code, add a framework, then run the app … With New Relic for Mobile Apps, we can clearly see which calls are being made, which ones are failing, how fast the servers are responding, and so on. There’s so much comfort in having instant visibility into our app’s performance — just knowing that everything’s OK.”</p>
<p>New Relic enables Unwired Revolution to identify and address performance issues on a proactive basis — long before those issues impact end users. This lets his team spend their time on something other than troubleshooting. We can spend more time doing something productive rather than chasing down a problem,” he says. “The investment we’re making in New Relic is trivial compared to the time it takes for a team of skilled developers to search for the source of a performance issue. From that perspective alone, the software easily pays for itself.”</p>
<p>And most importantly, better performance means a better experience for Unwired Revolution’s end users. “Our DocLink application is a big hit,” says Vlasach. “Users are saying, ‘This app is fun to use. It makes my work so much easier.’ That’s exactly what we’re going for — and performance plays a huge role in making their experience more enjoyable. At this point, I honestly can’t imagine releasing a mobile app without help from New Relic.”</p>
<p><span style="font-size: 1.25em;"><strong>Learn More</strong></span><br />
Read the <a title="Unwired Revolution Gains Full Visibility  into Enterprise Environments with Server  Side and Mobile App Monitoring from  New Relic" href="http://try.newrelic.com/rs/newrelic/images/NewRelic-UnwiredRevolution-CaseStudy.pdf" target="_blank">full case study</a> to find out how Unwired Revolution gained full visibility into its enterprise environments with New Relic.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/12/case-study-unwired-revolution-gains-full-visibility-into-enterprise-environments-with-new-relic/">Case Study: Unwired Revolution Gains Full Visibility into Enterprise Environments with New Relic</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/12/case-study-unwired-revolution-gains-full-visibility-into-enterprise-environments-with-new-relic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing dPerf – A Distributed Low Impact CPU Profiler for iOS</title>
		<link>http://blog.newrelic.com/2013/06/12/introducing-dperf-a-distributed-low-impact-cpu-profiler-for-ios/</link>
		<comments>http://blog.newrelic.com/2013/06/12/introducing-dperf-a-distributed-low-impact-cpu-profiler-for-ios/#comments</comments>
		<pubDate>Wed, 12 Jun 2013 13:30:51 +0000</pubDate>
		<dc:creator>Jared Stanbrough</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13050</guid>
		<description><![CDATA[<p>A few months ago, we launched an awesome new product – New Relic for Mobile Apps. As with all the products we develop, we wanted it to have a very low footprint on the apps it monitors. We needed a way to measure the impact our Mobile SDK has on our customers’ apps and ensure [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/12/introducing-dperf-a-distributed-low-impact-cpu-profiler-for-ios/">Introducing dPerf – A Distributed Low Impact CPU Profiler for iOS</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>A few months ago, we launched an awesome new product – <a title="New Relic for Mobile Apps" href="http://newrelic.com/mobile-monitoring" target="_blank">New Relic for Mobile Apps</a>. As with all the products we develop, we wanted it to have a very low footprint on the apps it monitors. We needed a way to measure the impact our Mobile SDK has on our customers’ apps and ensure this impact was as close to zero as possible.</p>
<p>Existing tools weren’t a good fit. Our actual profile kept getting lost in the noise of tools like Instruments.app. We quickly realized we needed something extremely lightweight. And since our Mobile SDK runs on many different types of devices, we knew we needed a tool that could be distributed easily across a device test lab (such as the one our friends at <a title="AppThwack" href="https://appthwack.com/" target="_blank">AppThwack</a> have built).</p>
<p>With those goals in mind, we developed <a title="dPerf" href="http://github.com/newrelic/dPerf" target="_blank">dPerf</a> – a small on-device profiling framework. Metrics collected by the profiler are pushed to a Node.js service with JSON over REST and are stored in a MongoDB collection. The Node service then provides a view that renders the profile data with Google Charts.</p>
<p>And here&#8217;s the best part: New Relic is releasing dPerf as an open source project! It can be found on the <a href="https://github.com/newrelic/dperf">dPerf New Relic Repository</a> on Github. Read on to learn more about how it works.</p>
<p><span style="font-size: 1.25em;"><b>The New Relic iOS SDK</b></span><br />
Before we dive into the technical details of dPerf, let’s talk a little bit about the New Relic iOS SDK.</p>
<p>Our approach to application monitoring has two main phases: instrumentation and reporting. The instrumentation phase collects data about network activities, such as NSURLConnection delegate method calls, into a memory buffer. Then once per minute, the reporting phase sends the contents of the memory buffer to the New Relic server.</p>
<p>It’s important to capture profiles for both phases of execution. This is a pretty easy task. (The profiler just needs a sane clock and to run for more than one minute.) If we know the start times for the application, profiler, agent and agent reporting phase, we can easily identify samples from the different phases.</p>
<p><span style="font-size: 1.25em;"><b>Profiling Strategy</b></span><br />
The general strategy for profiling a system is universal: sample the system at regular intervals. Any overhead incurred by the sampling process itself should be calculated and corrected by obtaining an average profile for the sampling process over a large number of runs, and subtracting this time from the samples.</p>
<p>The sampling interval is a critical parameter for a sampling process. Sampling theory (specifically, the <a title="Nyquist–Shannon sampling theorem" href="http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem" target="_blank">Nyquist–Shannon sampling theorem</a>) states that we can only accurately sample a process operating at a rate of R by sampling it at a minimum rate of 2R. This minimum rate, 2R, is known as the <a title="Nyquist rate" href="http://en.wikipedia.org/wiki/Nyquist_rate" target="_blank">Nyquist rate</a>. For example, to produce an accurate profile of a system performing an operation once per second, we must sample it twice per second. Sampling at a lower rate misses detail and introduces statistical noise. A good description of the Nyquist rate as it applies to audio sampling can be found <a title="DSP_nyquist.cfm" href="http://www.efunda.com/designstandards/sensors/methods/DSP_nyquist.cfm" target="_blank">here</a>.</p>
<p>It’s ideal to conduct the samples as fast as possible, but higher sampling rates require more system resources. And this defeats the purpose of a lightweight profiling system. A critical task then becomes how to identify the ideal sampling rate to capture all relevant information, while minimizing the impact of the sampling process.</p>
<p>We’ve tested varying sampling rates between 10 – 100 samples per second. And we’ve found that a rate of between 10 – 50 samples per second is enough for most apps that do a lot of network activity. You can find that sampling at a higher rate reveals some interesting ‘jitters’ from external processes such as push notifications, SMS and the like.</p>
<p>In this project, the sampled value is the total CPU time used by the process across all threads, which is an ever-increasing value. By computing the changes between values, we can establish the relative CPU used between sampling periods.</p>
<p><span style="font-size: 1.25em;"><b>What About Instruments.app?</b></span><br />
Instruments.app is an amazing application. For the majority of cases, it’s more than adequate for profiling applications as its memory allocation tracking and reference cycle graphs are great tools for memory profiling. Its value is much more limited for CPU profiling, especially on-device.</p>
<p>Instruments.app is great if you want to aggregate the time spent in a particular method, context switch and system call. Unfortunately, it’s also resource intensive. The performance of method calls will still be accurate relative to one another, but the profile isn’t indicative at all of application performance on-device. Additionally, some handy tools such as the Dispatch instrument are not available when you attach to a process on-device.</p>
<p>Also, Instruments.app doesn’t make it easy to export raw metric data. Let’s say you’re trying to analyze dozens of profiled runs across dozens of devices. You want a simple and automated solution to compare the results.</p>
<p><span style="font-size: 1.25em;"><b>On-Device Profiling Client</b></span><br />
The profiler client has two main components: the periodic timer and the value function that’s being sampled.</p>
<p><span style="font-size: 1.25em;"><b>Creating Fast Timers</b></span><br />
iOS provides a few options for creating periodic timers. The NSTimer class is the most straightforward way to create a timer. NSTimer works reasonably well for timers with long intervals, such as a task that runs each second or more. For sub-second timers, NSTimer starts to become less than ideal. According to the documentation from Apple, NSTimer resolution is limited to around 50 – 100ms, but timers operating on this magnitude can experience a large amount of variability in the time that they actually fire.</p>
<p>The better choice for high resolution timing is to use Grand Central Dispatch (GCD) source timers. These timers are extremely accurate and add a fairly small amount of system load even at intervals around 10ms (100 samples per second). Dispatch source timers also fire at more regular intervals and have less variability than NSTimers. If the application doesn’t require precise timing, you can specify a ‘leeway’ argument when you create dispatch source timers to allow for more variability. For example, a timer can be created with an interval of one minute and leeway of five seconds. In this case, the timer will fire every 60 +/- 5 seconds.</p>
<p>Apple&#8217;s <a title="Apple's Concurrency Programming Guide" href="http://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html" target="_blank">Concurrency Programming Guide</a> provides an example of creating dispatch source timers:</p>
<pre class="brush: objc; title: ; notranslate">
dispatch_source_t CreateDispatchTimer(uint64_t interval,
                                      uint64_t leeway,
                                      dispatch_queue_t queue,
                                      dispatch_block_t block)
{
    dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER,
                                                     0, 0, queue);
    if (timer)
    {
        dispatch_source_set_timer(timer, dispatch_walltime(NULL, 0), interval, leeway);
        dispatch_source_set_event_handler(timer, block);
        dispatch_resume(timer);
    }
    return timer;
}
</pre>
<p>Using this timer is straightforward:</p>
<pre class="brush: objc; title: ; notranslate">
- (void) start
{
    _dispatchTimer = CreateDispatchTimer((1.0 / _sampleRate) * NSEC_PER_SEC, 0, dispatch_get_main_queue(), ^{
        [self sample];
    });
}
</pre>
<p>This method will create a dispatch timer which fires at _sampleRate times per second. We want it to be as accurate as possible, so a leeway of zero is given. It operates on the main queue and invokes a block that invokes the &#8216;sample&#8217; method.</p>
<p><span style="font-size: 1.25em;"><b>Sampling CPU Usage</b></span><br />
Now that we have a fast and reliable timer, we can turn our attention toward interesting values to sample. We’re currently interested in application speed, so we need a good source for CPU utilization data.</p>
<p>iOS provides a great deal of low level information through the mach kernel task API, which is defined in mach/task.h. Apple has little documentation for these functions on iOS, but analogues exist for other mach-based kernels such as XNU and Darwin. These functions behave in more or less the same way across mach kernels, so documentation and code examples using this API are highly portable to iOS.</p>
<p>To find the aggregate CPU utilization for the application, we perform the following actions:</p>
<p style="padding-left: 30px;">1. Call mach_task_self to obtain the current task.</p>
<p style="padding-left: 30px;">2. Call task_info to retrieve basic info about the task including CPU time from terminated threads.</p>
<p style="padding-left: 30px;">3. Call task_threads to retrieve an array of active threads.</p>
<p style="padding-left: 30px;">4. For each thread, call thread_info which returns accumulated CPU time, and add to total.</p>
<p>Since these are low level kernel interfaces, take care when you allocate and de-allocate memory for the various structures.</p>
<p>The method below is a slightly modified version of the method provided in this <a title="How do you measure actual on-CPU time for an iOS thread?" href="http://stackoverflow.com/a/11659289/2263788" target="_blank">Stack Overflow answer</a>:</p>
<pre class="brush: objc; title: ; notranslate">
- (double)cpuTime
{
    task_t task;
    kern_return_t error;
    mach_msg_type_number_t count;
    thread_array_t thread_table;
    thread_basic_info_t thi;
    thread_basic_info_data_t thi_data;
    unsigned table_size;
    unsigned table_array_size;
    struct task_basic_info ti;
    double total_time;

    task = mach_task_self();
    count = TASK_BASIC_INFO_COUNT;
    error = task_info(task, TASK_BASIC_INFO, (task_info_t)&amp;ti, &amp;count);
    if (error != KERN_SUCCESS) {
        return -1;
    }
    {
        unsigned i;

        //
        // the following times are for threads which have already terminated and gone away.
        //
        total_time = ti.user_time.seconds + ti.user_time.microseconds * 1e-6;
        total_time += ti.system_time.seconds + ti.system_time.microseconds * 1e-6;

        error = task_threads(task, &amp;thread_table, &amp;table_size);

        //
        // failed to retrieve thread list: we can't proceed any further.
        //
        if (error != KERN_SUCCESS) {
            error = mach_port_deallocate(mach_task_self(), task);
            assert(error == KERN_SUCCESS);
            return -1;
        }

        thi = &amp;thi_data;
        table_array_size = table_size * sizeof(thread_array_t);

        //
        // for each active thread, add up thread time
        //
        for (i = 0; i &lt; table_size; ++i) {
            count = THREAD_BASIC_INFO_COUNT;
            error = thread_info(thread_table[i], THREAD_BASIC_INFO, (thread_info_t)thi, &amp;count);

            //
            // if the thread_info call fails, clean up and fail hard.
            // partial results are probably useless.
            //
            if (error != KERN_SUCCESS) {
                for (; i &lt; table_size; ++i) {
                    error = mach_port_deallocate(mach_task_self(), thread_table[i]);
                    assert(error == KERN_SUCCESS);
                }

                error = vm_deallocate(mach_task_self(), (vm_offset_t)thread_table, table_array_size);
                assert(error == KERN_SUCCESS);

                error = mach_port_deallocate(mach_task_self(), task);
                assert(error == KERN_SUCCESS);

                return -1;
            }

            //
            // otherwise, accumulate &amp; continue.
            //
            if ((thi-&gt;flags &amp; TH_FLAGS_IDLE) == 0) {
                total_time += thi-&gt;user_time.seconds + thi-&gt;user_time.microseconds * 1e-6;
                total_time += thi-&gt;system_time.seconds + thi-&gt;system_time.microseconds * 1e-6;
            }

            error = mach_port_deallocate(mach_task_self(), thread_table[i]);
            assert(error == KERN_SUCCESS);
        }

        //
        // deallocate the thread table.
        //
        error = vm_deallocate(mach_task_self(), (vm_offset_t)thread_table, table_array_size);
        assert(error == KERN_SUCCESS);
    }
    if (task != mach_task_self()) {
        error = mach_port_deallocate(mach_task_self(), task);
        assert(error == KERN_SUCCESS);
    }
    return total_time;
}
</pre>
<p><span style="font-size: 1.25em;"><b>Who Profiles the Profiler?</b></span><br />
There is some unavoidable overhead incurred by adding a profiler to an application that can be corrected for with benchmarking. The average time it takes to perform profiling operations is calculated with repeated trials and then used to correct sampled data. This technique should be familiar to many low level and embedded programmers.</p>
<p>The strategy is simple:</p>
<p style="padding-left: 30px;">1. Record a timestamp at the start of benchmarking.</p>
<p style="padding-left: 30px;">2. Perform N trials of the benchmarked operation. This should be a tight loop that does nothing but execute the operation.</p>
<p style="padding-left: 30px;">3. Record a timestamp at the end of benchmarking.</p>
<p style="padding-left: 30px;">4. Calculate elapsed time by subtracting the start timestamp from the end timestamp.</p>
<p style="padding-left: 30px;">5. Divide this elapsed time by N (number of trials) to obtain an average time per operation.</p>
<p>A generalized method for benchmarking could be written such as:</p>
<pre class="brush: objc; title: ; notranslate">
- (uint64_t) benchmarkWithTrials: (uint) trials andBlock: (dispatch_block_t) block
{
    // call the block first, warming up any method call table lookups
    block();

    uint64_t start = mach_absolute_time();
    for(int t = 0; t &lt; trials; t++) {
        block();
    }
    return (mach_absolute_time() - start) / trials;
}
</pre>
<p>Fortunately, the function calls to retrieve the task and thread info are very fast. On an iPhone 5, gathering CPU information for all threads takes on average about 150 microseconds.</p>
<p><span style="font-size: 1.25em;"><b>Profiling Server</b></span><br />
At this point, we have a tool that can record CPU usage efficiently at regular intervals. What should we do with this data?</p>
<p>We could have printed sample values to a console log for analysis or even written a small UI to display the profile after the profiling session was over. A goal of this project was to enable profiling across a variety of devices efficiently and scraping dozens of log files isn’t a scalable solution.</p>
<p>Instead, we wrote a basic client / server architecture. The profiling client buffers sampled data until the profiling session is completed. The data is then translated to JSON and sent to a RESTful Node service over HTTP. Along with the sample data, the JSON structure includes information about the device, a unique identifier for the profiling session, sampling rate and the name of the test performed.</p>
<p>This allows multiple devices to run a variety of profiling tests while reporting back to the same server. Decoupling the system in this way provides a lot of scalability and flexibility in the distribution and timing of tests.</p>
<p>Not including static content, the Node server is made up of only about 70 lines of code. It has two jobs:</p>
<p style="padding-left: 30px;">* Store incoming data into a MongoDB collection.</p>
<p style="padding-left: 30px;">* Serve that data up using Google Charts.</p>
<p>The server handles data posts from profilers, as well as generating charts and data sets for analysis. The following modules are used to accomplish this:</p>
<p style="padding-left: 30px;">* Mongodb: Node driver for MongoDB</p>
<p style="padding-left: 30px;">* Express:  Amazing web framework for REST and MVC mapping</p>
<p style="padding-left: 30px;">* Jade: Powerful templating for dynamic views</p>
<p style="padding-left: 30px;">* stylus and nib: CSS preprocessor</p>
<p style="padding-left: 30px;">* Google Charts: Google JavaScript library for easy chart generation</p>
<p>This <a title="A Simple Website in Node.js with Express, Jade and Stylus" href="http://clock.co.uk/tech-blogs/a-simple-website-in-nodejs-with-express-jade-and-stylus" target="_blank">article</a> is a great tutorial for using some of these modules to build a web app.</p>
<p><span style="font-size: 1.25em;"><b>Distributed Testing with AppThwack</b></span><br />
One of the major challenges of mobile development is ensuring compatibility with the wide variety of devices available on the market. iOS currently runs on 16 different Apple hardware platforms and Android runs on several hundred. Trying to build a test lab to cover all these permutations or perform tests on the various devices would be both cost prohibitive and time consuming.</p>
<p><a title="AppThwack" href="https://appthwack.com/" target="_blank">AppThwack</a> is a young company with an innovative approach to mobile testing. They have an automated testing platform that deploys applications to hundreds of real devices, runs tests and returns all sorts of interesting information. Along with reporting test failures, AppThwack also gathers screenshots and log files from all the devices.</p>
<p>With the AppThwack platform, we were able to deploy dPerf to multiple devices easily. When each device finished its test, it sent the samples to our central test server.</p>
<p><span style="font-size: 1.25em;"><b>Results</b></span><br />
After all of the pieces were in place, it was time to run some tests. To establish a baseline, we first tested an application that was completely idle except for running the New Relic agent and Profiler. Technically, we also ran it without the New Relic agent to get a true baseline, but an empty chart is not very interesting.</p>
<p style="text-align: center;"><a title="Idle Test Phone 6.1.4" href="http://blog.newrelic.com/wp-content/uploads/idle_test_local.png" target="_blank"><img class="aligncenter  wp-image-13052" style="border: 1px solid black;" title="Idle Test Phone 6.1.4" alt="Idle Test Phone 6.1.4" src="http://blog.newrelic.com/wp-content/uploads/idle_test_local.png" width="765" height="166" /></a></p>
<p>This chart clearly shows the New Relic agent reporting after exactly one minute. It&#8217;s pretty fast, too!</p>
<p>When this same idle test was run on the AppThwack platform, the results were a a bit different. One testing option AppThwack provided is to send several hundred random events during the testing period. This caused the &#8216;idle&#8217; moments in the application to appear more jittery than what we saw in first test, which essentially had no events being fired. We also saw some of the AppThwack initialization during application start and the beginning of the random event stream. The New Relic reporting call was still visible when its timer fired after one minute.</p>
<p style="text-align: center;"><a title="Idle Test iPhone 6.1.3" href="http://blog.newrelic.com/wp-content/uploads/idle_test_thwack.png" target="_blank"><img class="aligncenter  wp-image-13053" style="border: 1px solid black;" title="Idle Test iPhone 6.1.3" alt="Idle Test iPhone 6.1.3" src="http://blog.newrelic.com/wp-content/uploads/idle_test_thwack.png" width="763" height="167" /></a></p>
<p>Next, we checked the behavior of an application generating a bit of network traffic. This test performed a HTTP request to the highly useful <a title="httpstat.us" href="http://httpstat.us" target="_blank">httpstat.us</a> site every second. We began with a plain old HTTP 200 OK request.</p>
<p style="text-align: center;"><a title="200 1rpm Test iPad" href="http://blog.newrelic.com/wp-content/uploads/200_1rpm.png" target="_blank"><img class="aligncenter  wp-image-13054" style="border: 1px solid black;" title="200 1rpm Test iPad" alt="200 1rpm Test iPad" src="http://blog.newrelic.com/wp-content/uploads/200_1rpm.png" width="771" height="167" /></a></p>
<p>We definitely saw a periodic process here, mixed in with the &#8216;noise&#8217; from the random event stream. It&#8217;s interesting to note that even at this point in testing, the New Relic agent used so little CPU that it was indistinguishable from the other network traffic.</p>
<p>Ramping up the network traffic to 5 requests per second, we saw a familiar pattern. The chart looked essentially the same as the 1 request per second, but the periodic process was multiplied. The New Relic reporting call was somewhat visible here, as a &#8216;thicker&#8217; line around 60 seconds.</p>
<p style="text-align: center;"><a title="200 5rpm Test iPad" href="http://blog.newrelic.com/wp-content/uploads/200_5rpm.png" target="_blank"><img class="aligncenter  wp-image-13055" style="border: 1px solid black;" title="200 5rpm Test iPad" alt="200 5rpm Test iPad" src="http://blog.newrelic.com/wp-content/uploads/200_5rpm.png" width="771" height="167" /></a></p>
<p>Next we moved on to an application that used more CPU resources. The chart below shows an application that queries the U.S. Geological Survey website for a GeoJSON data set of all the 2.5 magnitude earthquakes that occurred in the last month. After the request was complete, the GeoJSON was decoded. This process repeated every five seconds. The JSON payload size was quite large &#8212; roughly 600 kilobytes &#8212; so this was also a good test for handling of large HTTP responses.</p>
<p style="text-align: center;"><a title="USGS Parse Test" href="http://blog.newrelic.com/wp-content/uploads/usgs_5sec.png" target="_blank"><img class="aligncenter  wp-image-13056" title="USGS Parse Test" alt="USGS Parse Test" src="http://blog.newrelic.com/wp-content/uploads/usgs_5sec.png" width="772" height="167" /></a></p>
<p>Here the periodic process was quite visible and by the &#8216;thickness&#8217; of the spikes we saw that the parsing took longer to complete &#8212; about a second or so.</p>
<p>The final verdict was that the New Relic SDK added only a tiny bit of overhead &#8212; about 10 – 20ms on average. And this overhead was only detectable in an application that was mostly idle, which is a rare case indeed.</p>
<p><span style="font-size: 1.25em;"><b>Source Code</b></span><br />
Again, if you’re interested in trying out dPerf for yourself, you can find the source for the profiling system in the <a title="dPerf New Relic repository" href="http://github.com/newrelic/dPerf" target="_blank">dPerf New Relic repository</a> on GitHub. We hope you find it as useful as we did. Feel free to use and enhance this tool to suit your specific needs. Got some cool changes that you want to share? Send us a pull request!</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/12/introducing-dperf-a-distributed-low-impact-cpu-profiler-for-ios/">Introducing dPerf – A Distributed Low Impact CPU Profiler for iOS</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/12/introducing-dperf-a-distributed-low-impact-cpu-profiler-for-ios/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make It So Redux: Introducing the New Time Picker</title>
		<link>http://blog.newrelic.com/2013/06/11/make-it-so-redux-introducing-the-new-time-picker/</link>
		<comments>http://blog.newrelic.com/2013/06/11/make-it-so-redux-introducing-the-new-time-picker/#comments</comments>
		<pubDate>Wed, 12 Jun 2013 03:48:14 +0000</pubDate>
		<dc:creator>Roger Gilliam</dc:creator>
				<category><![CDATA[Product Updates]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13042</guid>
		<description><![CDATA[<p>Working on UI and UX design is fun. It’s challenging and rewarding work, especially when you achieve success, and it adds fuel to the problem-solving fire within when you miss the mark. The New Relic Design Team is constantly working hard to improve our user experience by finding simple, usable solutions for complex display issues. [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/11/make-it-so-redux-introducing-the-new-time-picker/">Make It So Redux: Introducing the New Time Picker</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Working on UI and UX design is fun. It’s challenging and rewarding work, especially when you achieve success, and it adds fuel to the problem-solving fire within when you miss the mark.</p>
<p>The New Relic Design Team is constantly working hard to improve our user experience by finding simple, usable solutions for complex display issues. I’d like to describe our experiences with a project we shipped today – our newly designed time picker.</p>
<p><span style="font-size: 1.25em;"><strong>The Power of Feedback</strong></span><br />
Below you’ll see a couple of shots from our old time picker:</p>
<p style="text-align: center;"><a title="The Old Timepicker" href="http://blog.newrelic.com/wp-content/uploads/old-timepickers-1.png" target="_blank"><img class=" wp-image-13048 aligncenter" title="The Old Timepicker" alt="The Old Timepicker" src="http://blog.newrelic.com/wp-content/uploads/old-timepickers-1.png" width="550" height="333" /></a></p>
<p>After it shipped, we started collecting and documenting usability issues. We found a few things that kept coming up:</p>
<blockquote><p>“It’s too hard to switch from one timeframe to another. I have to click the time span I want and then click the ‘Make it so!’ button at the bottom.”</p>
<p>“Ending now looks too much like Ending in the past.”</p>
<p>“The layout is awkward.”</p></blockquote>
<p>We implemented double-click functionality on the time spans, but found that it wasn’t enough because it wasn&#8217;t very discoverable. And since we aren&#8217;t satisfied with that kind of feedback, we knew we needed to go back to the drawing board and find a better solution.</p>
<p><span><strong>Reiteration</strong></span><br />
These screenshots show the time picker we released today:</p>
<p><a href="http://blog.newrelic.com/wp-content/uploads/new_time_picker.png"><img class="aligncenter size-full wp-image-13051" alt="New Time Picker" src="http://blog.newrelic.com/wp-content/uploads/new_time_picker.png" width="556" height="375" /></a></p>
<p>We fixed the layout issues by using a vertical arrangement of parts instead of using a horizontal split. The time span labels are clickable, and dragging the slider immediately triggers a time window change. For the Star Trek fans in the audience, we kept the ‘Make it so’ button for when you make your historical selection &#8216;just so.&#8217;</p>
<p>There’s also a new ‘Performance since the last deployment’ link. If you&#8217;re configured to record deployments, you’ll see this link at the very bottom. To get set up with this feature (which we rely on heavily ourselves), go to <em>Your app</em> &gt; <em>Events</em> &gt; <em>Deployments</em>.</p>
<p>We hope this new time picker is an improvement for you. But change is no guarantee of success. Tell us what you think of the new time picker in the comments below.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/11/make-it-so-redux-introducing-the-new-time-picker/">Make It So Redux: Introducing the New Time Picker</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/11/make-it-so-redux-introducing-the-new-time-picker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrating Your Android App from Eclipse to Android Studio</title>
		<link>http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/</link>
		<comments>http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/#comments</comments>
		<pubDate>Fri, 07 Jun 2013 18:06:00 +0000</pubDate>
		<dc:creator>Jason Snell</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Performance Tech Tips]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13021</guid>
		<description><![CDATA[<p>One of the more exciting announcements from Google IO this year was the Android Team’s decision to release Android Studio. Android Studio is JetBrains’ IntelliJ IDEA with a brand new, extremely rich, Android-focused plugin. (It’s similar to Eclipse with the ADT package.) If you’re feeling adventurous, give it a spin by migrating one of your [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/">Migrating Your Android App from Eclipse to Android Studio</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>One of the more exciting announcements from <a title="Google IO" href="https://developers.google.com/events/io/" target="_blank">Google IO</a> this year was the Android Team’s decision to release <a title="Android Studio" href="http://developer.android.com/sdk/installing/studio.html" target="_blank">Android Studio</a>. Android Studio is <a title="JetBrains’ IntelliJ IDEA" href="http://www.jetbrains.com/idea/" target="_blank">JetBrains’ IntelliJ IDEA</a> with a brand new, extremely rich, Android-focused plugin. (It’s similar to Eclipse with the <a title="ADT package" href="http://developer.android.com/sdk/index.html" target="_blank">ADT package</a>.) If you’re feeling adventurous, give it a spin by migrating one of your Eclipse apps.</p>
<p><span style="font-size: 1.25em;"><strong>Getting Started</strong></span><br />
First, you’ll need to update your SDK installation to the latest version. (Versions 22.0.0 and up will migrate your app to Android Studio.) After a few SDK Manager updates and restarts, you should see something like this:</p>
<p style="text-align: center;"><a title="Android Studio packages" href="http://blog.newrelic.com/wp-content/uploads/Android_Studio_packages.png" target="_blank"><img class=" wp-image-13022 aligncenter" style="border: 1px solid black;" title="Android Studio packages" alt="Android Studio packages" src="http://blog.newrelic.com/wp-content/uploads/Android_Studio_packages.png" width="458" height="85" /></a></p>
<p>Now you’re ready to export your application from Eclipse. Google chose <a title="Gradle" href="http://www.gradle.org/" target="_blank">Gradle</a> as the new Android build system, so we’ll generate the necessary build files first. From the Eclipse menu, choose &#8216;File’ and then click ‘Export’. Under the Android folder, you’ll find ‘Generate Gradle build files’:</p>
<p style="text-align: center;"><a title="Android Studio Generate Gradle build files" href="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_Gradle.png" target="_blank"><img class="aligncenter  wp-image-13024" style="border: 1px solid black;" title="Android Studio Generate Gradle build files" alt="Android Studio Generate Gradle build files" src="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_Gradle.png" width="281" height="54" /></a></p>
<p>Choose the project you want to migrate and click ‘Finish’.  Next, exit Eclipse and fire up Android Studio. You’ll want to import an existing project. You can do it from the File menu or the wizard if you don’t have a project opened. Navigate to the directory containing your app and double click the <code>build.gradle</code> file:</p>
<p style="text-align: center;"><a title="Android Studio: Select File or Directory to Import" href="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_SelectFile1.png" target="_blank"><img class="aligncenter  wp-image-13025" title="Android Studio: Select File or Directory to Import" alt="Android Studio: Select File or Directory to Import" src="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_SelectFile1.png" width="335" height="421" /></a></p>
<p>Now you’re almost there! Check ‘Use auto-import’ and select the Gradle wrapper. Or you can choose a Gradle distribution location if you have Gradle 1.6 installed. (This will skip the step of adding a few files to your project directory.) When you click ‘Finish’, Android Studio will perform a few housekeeping tasks and open your shiny new Gradle project. Hurray!</p>
<p style="text-align: center;"><a title="Android Studio: Import Project" href="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_ImportProject.png" target="_blank"><img class="aligncenter  wp-image-13026" title="Android Studio: Import Project" alt="Android Studio: Import Project" src="http://blog.newrelic.com/wp-content/uploads/AndroidStudio_ImportProject.png" width="514" height="185" /></a></p>
<p><span style="font-size: 1.25em;"><strong>Bonus Round</strong></span><br />
Now that you’re working happily in Android Studio, isn’t it time to add a little New Relic action to the mix? Don’t have a New Relic account? (<a title="New Relic" href="http://newrelic.com/" target="_blank">Sign up</a> for one today and get a free 30-day trial!)</p>
<p>First, merge the following into your <span style="font-family: Courier;">build.gradle</span> file:</p>
<pre class="brush: java; title: ; notranslate">
buildscript {
  dependencies {
    classpath 'com.newrelic.agent.android:agent-gradle-plugin:2.397.0'
  }
}

repositories {
  mavenCentral()
}

apply plugin: 'android'
apply plugin: 'newrelic'

dependencies {
  compile 'com.newrelic.agent.android:android-agent:2.397'
}
</pre>
<p>Then add an import to your default Activity class:</p>
<pre class="brush: java; title: ; notranslate">
import com.newrelic.agent.android.NewRelic;
</pre>
<p>And in the onCreate() method, add this call to initialize New Relic:</p>
<pre class="brush: java; title: ; notranslate">
NewRelic.withApplicationToken(&quot;&lt;your mobile app token&gt;&quot;).start(this.getApplication());
</pre>
<p>That’s it! We’d love to hear about your migration stories. Let us know your experiences in the comments below.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/">Migrating Your Android App from Eclipse to Android Studio</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Join New Relic at Scala Days</title>
		<link>http://blog.newrelic.com/2013/06/07/new-relic-at-scala-days/</link>
		<comments>http://blog.newrelic.com/2013/06/07/new-relic-at-scala-days/#comments</comments>
		<pubDate>Fri, 07 Jun 2013 18:05:15 +0000</pubDate>
		<dc:creator>Chris Hansen</dc:creator>
				<category><![CDATA[Company News]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13030</guid>
		<description><![CDATA[<p>Are you going to the Scala Days conference next week? New Relic is! In case you haven&#8217;t been there before, Scala Days is the annual gathering where developers who work with Scala and Scala-based libraries and frameworks can share their experiences and new ideas. New from New Relic: Play! Support So what goodness do we [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/07/new-relic-at-scala-days/">Join New Relic at Scala Days</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a title="Scala Days" href="http://blog.newrelic.com/wp-content/uploads/scaladays_2.png" target="_blank"><img class="aligncenter" title="Scala Days" alt="Scala Days" src="http://blog.newrelic.com/wp-content/uploads/scaladays_2.png" width="550" height="93" /></a></p>
<p>Are you going to the <a title="Scala Days" href="http://scaladays.org/" target="_blank">Scala Days</a> conference next week? New Relic is! In case you haven&#8217;t been there before, Scala Days is the annual gathering where developers who work with Scala and Scala-based libraries and frameworks can share their experiences and new ideas.</p>
<p><span style="font-size: 1.25em;"><strong>New from New Relic: Play! Support</strong></span><br />
So what goodness do we have planned for this year&#8217;s Scala Days? Earlier this week, we announced our support for applications that run all versions of the <a title="Play! framework" href="http://www.typesafe.com/platform/runtime/playframework" target="_blank">Play! framework</a>. By tracking web requests across asynchronous activity (through <a title="Akka" href="http://www.typesafe.com/platform/runtime/akka" target="_blank">Akka</a>, <a title="Scala" href="http://www.typesafe.com/platform/tools/scala" target="_blank">Scala</a> Promises and Futures and WS API), we provide a consolidated view of activities that affect your customer&#8217;s experience.</p>
<p>We also provide instrumentation that benefits other apps written in Scala, use Akka as a framework, or use <a title="Netty" href="http://netty.io/" target="_blank">Netty</a> as a server. As part of this week&#8217;s announcement, we described our increasing focus on Java as a language and JVM as an ecosystem. Specifically, these include our <a title="Dive into your JVM with New Relic" href="http://blog.newrelic.com/2013/05/09/dive-into-your-jvm-with-new-relic/" target="_blank">improved JVM metrics</a> and our newly launched support for the <a title="New Relic Support for the Play 2 Framework" href="https://blog.newrelic.com/?p=12988" target="_blank">Play 2 framework.</a></p>
<p>By adding New Relic to your Play 2.x application, you can see your web transactions organized by controller method / function. You&#8217;ll immediately see summary data about what web transactions are called most often, where they’re spending their time, and overall throughput and response time. We provide you with performance insight into your web applications so you can very quickly find, diagnose and fix those pesky performance issues before your customers feel any pain.</p>
<p><span style="font-size: 1.25em;"><strong>New Relic at Scala Days</strong></span><br />
New Relic is proud to be a Scala Days Gold sponsor. We have three engineers attending the conference who can share how to use New Relic as a tool for performance-driven development.</p>
<p>Drop by the New Relic table in the Tiffany Lobby of the Hudson Theater. We&#8217;d love to talk to you about your Scala apps and how New Relic can give you instant insight into your apps&#8217; performance, errors and bottlenecks. If you&#8217;d like to get a head start, <a title="New Relic Docs: Play Installation for Java" href="https://newrelic.com/docs/java/play-installation-for-java" target="_blank">installation is simple</a> and you can enable performance monitoring insight for your application in just minutes!</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/07/new-relic-at-scala-days/">Join New Relic at Scala Days</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/07/new-relic-at-scala-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Dev Memes that make us lol &#8217;round here @newrelic</title>
		<link>http://blog.newrelic.com/2013/06/06/developer-memes/</link>
		<comments>http://blog.newrelic.com/2013/06/06/developer-memes/#comments</comments>
		<pubDate>Thu, 06 Jun 2013 15:09:35 +0000</pubDate>
		<dc:creator>Patrick Moran</dc:creator>
				<category><![CDATA[Big Data]]></category>
		<category><![CDATA[Top Post]]></category>
		<category><![CDATA[devops]]></category>
		<category><![CDATA[memes]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13010</guid>
		<description><![CDATA[<p>I was going to write an intro blog post for these, but really &#8230;  I don&#8217;t need to. If you have better ones, reply in the comments below and we&#8217;ll include them.</p><p>The post <a href="http://blog.newrelic.com/2013/06/06/developer-memes/">Software Dev Memes that make us lol &#8217;round here @newrelic</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">I was going to write an intro blog post for these, but really &#8230;  I don&#8217;t need to. If you have better ones, reply in the comments below and we&#8217;ll include them.</p>
<p style="text-align: center;"><a title="Big data!" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13011" title="Big data!" alt="Big data!" src="http://blog.newrelic.com/wp-content/uploads/bigdata.jpg" width="275" height="353" /></a></p>
<p style="text-align: center;"><a title="Measure all the things!" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter size-full wp-image-13012" title="Measure all the things!" alt="Measure all the things!" src="http://blog.newrelic.com/wp-content/uploads/measureallthethings.jpg" width="400" height="300" /></a></p>
<p style="text-align: center;"><a title="Worked fine in dev ..." href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13013" title="Worked fine in dev ..." alt="Worked fine in dev ..." src="http://blog.newrelic.com/wp-content/uploads/workedin.jpg" width="400" height="299" /></a></p>
<p style="text-align: center;"><a title="One does not simply..." href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13014" title="One does not simply..." alt="One does not simply..." src="http://blog.newrelic.com/wp-content/uploads/devopssimply.jpg" width="250" height="250" /></a></p>
<p style="text-align: center;"><a title="One day to design and code ..." href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13015" title="One day to design and code ..." alt="One day to design and code ..." src="http://blog.newrelic.com/wp-content/uploads/wlarus.jpg" width="510" height="505" /></a></p>
<p style="text-align: center;"><a title="Big Data 2!" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13016" title="Big Data 2!" alt="Big Data 2!" src="http://blog.newrelic.com/wp-content/uploads/bigdata2.jpg" width="250" height="250" /></a></p>
<p style="text-align: center;"><a title="Y U No Deploy?" href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010%26preview%3Dtrue&amp;text=Software%20Dev%20Memes%20that%20make%20us%20lol%20%E2%80%99round%20here%20%40newrelic&amp;tw_p=tweetbutton&amp;url=http%3A%2F%2Fblog.newrelic.com%2F%3Fp%3D13010" target="_blank"><img class="aligncenter  wp-image-13017" title="Y U No Deploy?" alt="Y U No Deploy?" src="http://blog.newrelic.com/wp-content/uploads/nrmeme.jpg" width="250" height="250" /></a></p>
<p>The post <a href="http://blog.newrelic.com/2013/06/06/developer-memes/">Software Dev Memes that make us lol &#8217;round here @newrelic</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/06/developer-memes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Airplanes, Spaceships &amp; Web Perf, Oh My: Ways to Meetup with New Relic This Week</title>
		<link>http://blog.newrelic.com/2013/06/05/airplanes-spaceships-web-perf-oh-my-ways-to-meetup-with-new-relic-this-week/</link>
		<comments>http://blog.newrelic.com/2013/06/05/airplanes-spaceships-web-perf-oh-my-ways-to-meetup-with-new-relic-this-week/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 21:32:12 +0000</pubDate>
		<dc:creator>Leigh Shevchik</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Company News]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13006</guid>
		<description><![CDATA[<p>This week we’ll be participating in two exciting Meetups in San Francisco. Tonight, June 5th, from 6 – 8 pm, our own VP of Engineering, Bjorn Freeman-Benson, will be leading a Tech Talk at Airbnb&#8217;s HQ in San Francisco. Bjorn will be speaking about &#8216;Airplanes, Spaceships, and Missiles: Engineering Lessons from Famous Projects.&#8217; There’s still time to sign [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/05/airplanes-spaceships-web-perf-oh-my-ways-to-meetup-with-new-relic-this-week/">Airplanes, Spaceships &#038; Web Perf, Oh My: Ways to Meetup with New Relic This Week</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This week we’ll be participating in two exciting Meetups in San Francisco.</p>
<p><a title="airbnb logo" href="http://blog.newrelic.com/wp-content/uploads/airbnb_logo.jpg" target="_blank"><img class="alignright  wp-image-13008" style="margin: 10px;" title="airbnb logo" alt="airbnb logo" src="http://blog.newrelic.com/wp-content/uploads/airbnb_logo.jpg" width="168" height="88" /></a>Tonight, June 5<sup>th</sup>, from 6 – 8 pm, our own VP of Engineering, <a title="Bjorn Freeman-Benson on Twitter" href="https://twitter.com/bjorn_fb" target="_blank">Bjorn Freeman-Benson</a>, will be leading a <a title="See Airbnb's tech talk page" href="https://www.airbnb.com/techtalks" target="_blank">Tech Talk</a> at <a title="Airbnb Meetup info" href="https://www.airbnb.com/meetups/hwbwmpa23-tech-talk-bjorn-freeman-benson" target="_blank">Airbnb&#8217;s HQ</a> in San Francisco. Bjorn will be speaking about &#8216;Airplanes, Spaceships, and Missiles: Engineering Lessons from Famous Projects.&#8217; There’s still time to sign up through through the <a title="Airbnb Meetup page" href="https://www.airbnb.com/meetups/hwbwmpa23-tech-talk-bjorn-freeman-benson" target="_blank">Airbnb Meetup</a> group.</p>
<p><a title="San Francisco Web Performance Meetup" href="http://blog.newrelic.com/wp-content/uploads/sfwebperf.png" target="_blank"><img class="alignright  wp-image-13007" style="margin: 10px 5px;" title="San Francisco Web Performance Meetup" alt="San Francisco Web Performance Meetup" src="http://blog.newrelic.com/wp-content/uploads/sfwebperf.png" width="144" height="92" /></a>Then tomorrow, June 6<sup>th</sup>, from 6:30 – 8:30 pm, don’t miss your chance to see New Relic’s new headquarters when we host the <a title="San Francisco Web Performance Meetup" href="http://www.meetup.com/SF-Web-Performance-Group/events/121034862/" target="_blank">San Francisco Web Performance Meetup</a>. <a title="Rick Viscomi on Twitter" href="https://twitter.com/rick_viscomi" target="_blank">Rick Viscomi</a> will discuss ‘<a title="Waterfall AntiPatterns presentation" href="http://www.meetup.com/SF-Web-Performance-Group/events/121034862/" target="_blank">Waterfall AntiPatterns</a>’. Get some tips on how to become a web performance guru, meet some cool people, and enjoy our awesome Nerdvana meeting space.</p>
<p>See you there!</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/05/airplanes-spaceships-web-perf-oh-my-ways-to-meetup-with-new-relic-this-week/">Airplanes, Spaceships &#038; Web Perf, Oh My: Ways to Meetup with New Relic This Week</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/05/airplanes-spaceships-web-perf-oh-my-ways-to-meetup-with-new-relic-this-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Relic and the JVM Ecosystem</title>
		<link>http://blog.newrelic.com/2013/06/05/new-relic-and-the-jvm-ecosystem/</link>
		<comments>http://blog.newrelic.com/2013/06/05/new-relic-and-the-jvm-ecosystem/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 18:48:00 +0000</pubDate>
		<dc:creator>Patrick Lightbody</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[New & Noteworthy]]></category>
		<category><![CDATA[Product Updates]]></category>
		<category><![CDATA[Top Post]]></category>

		<guid isPermaLink="false">http://blog.newrelic.com/?p=13002</guid>
		<description><![CDATA[<p>Although Java remains one of the most popular programming languages in the world, the real story these days isn&#8217;t the Java language – it’s in the underlying virtual machine. Over the last few years, the JVM has branched out beyond just traditional support for existing languages such as as JRuby or Jython. It’s entered new territory with support [...]</p><p>The post <a href="http://blog.newrelic.com/2013/06/05/new-relic-and-the-jvm-ecosystem/">New Relic and the JVM Ecosystem</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Although Java remains one of the most popular programming languages in the world, the real story these days isn&#8217;t the Java language – it’s in the underlying virtual machine. Over the last few years, the JVM has branched out beyond just traditional support for existing languages such as as <a title="JRuby" href="http://jruby.org/" target="_blank">JRuby</a> or <a title="Jython" href="http://www.jython.org/" target="_blank">Jython</a>. It’s entered new territory with support for new languages custom designed for ease-of-use, scalability and concurrency. These days it&#8217;s not uncommon to use the JVM to jump right into a major project built on top of <a title="Groovy" href="http://groovy.codehaus.org/" target="_blank">Groovy</a> or <a title="Scala" href="http://www.scala-lang.org/" target="_blank">Scala</a>.</p>
<p>As the only APM vendor to support Java, Ruby, Python, PHP and .NET, New Relic has always supported a wide range of technologies and platforms. And we&#8217;ve been running thousands of applications on top of JRuby for years. But in the last month we&#8217;ve put out a couple releases that are important because they highlight our increased focus on not just Java as a language, but on the JVM as an ecosystem. Specifically, these include our <a href="http://blog.newrelic.com/2013/05/09/dive-into-your-jvm-with-new-relic/">improved JVM metrics</a> and our newly launched support for the <a title="Play 2 framework" href="https://blog.newrelic.com/?p=12988" target="_blank">Play 2 framework.</a></p>
<p><span style="font-size: 1.25em;"><strong>Better Support for the JVM Ecosystem</strong></span><br />
With our improved JVM metrics, we&#8217;re showing more data than ever that&#8217;s relevant to anyone running on the JVM, regardless of what programming language or framework they use. The data includes thread activity, HTTP session data, connection pool metrics, class load/unload counts, and more. And true to the New Relic spirit, we present it in a way that just makes sense. Although much of this data is derived from JMX values, we comb through them automatically for you so that you don&#8217;t have to worry about it (unless you have some advanced needs.)</p>
<p>To support the JVM ecosystem even further, we’ve also added Play 2 support for both Java and Scala. Although we already supported some versions of Play 1, Play 2 was quite a bit of a rewrite and embraced Scala much more extensively. To properly support Play 2, we had to tackle all sorts of new things. We added support for the Netty web server, support for Scala itself and support for the asynchronous development techniques that Play makes so easy to build with. This release is a big milestone for New Relic because it&#8217;s the first time we&#8217;ve supported two different languages (Java and Scala) with a single agent.</p>
<blockquote><p><em>“We were very impressed by New Relic&#8217;s leadership in embracing an emerging asynchronous web framework in Play 2 and were thrilled to work closely with their engineering teams to integrate Play 2 into the New Relic monitoring suite.” </em></p>
<p>&#8211; Michael Bryzek, CTO &amp; Cofounder, Gilt Groupe</p></blockquote>
<p>Although this isn’t broad Scala support (yet!), it&#8217;s the first step in recognizing and supporting the JVM for what it really is: a large ecosystem of diverse languages, frameworks and libraries. We hope that these two features demonstrate our commitment to the JVM and give you a glimpse into our future plans at New Relic.</p>
<p><span style="font-size: 1.25em;"><strong>Have More Questions?</strong></span></p>
<p><em>Q: What version of Play is supported?</em><br />
A: We support Play 1.2.x and are committed to continuing support for the Play 2.x (2.0, 2.1, etc) line going forward.</p>
<p><em>Q: Do you support Java, Scala or both?</em><br />
A: You can write your app in Java, Scala or a mix of both – it doesn’t matter to us. We’ll automatically trace through all the asynchronous handoff points that happen inside your Play app, regardless of your choice of language. In fact, because Play&#8217;s internals are written in Scala, we&#8217;re already doing the work of supporting a polyglot application under the covers – even if you&#8217;re writing your app in 100% Java.</p>
<p><em>Q: Do you now support any Scala application?</em><br />
A: Not exactly. If you have an app written in pure Scala, or perhaps with a framework such a <a title="Lift" href="http://liftweb.net/" target="_blank">Lift</a> or <a title="Finagle" href="http://twitter.github.io/finagle/" target="_blank">Finagle</a>, we won&#8217;t automatically pick up everything like we do with Play. However, you&#8217;re welcome to utilize our <a title="New Relic Java Agent API" href="https://newrelic.com/docs/java/java-agent-api" target="_blank">Java API</a> (which is totally compatible with Scala) to define some <a title="New Relic Docs: Custom Instrumentation with the Java Agent" href="https://newrelic.com/docs/java/custom-instrumentation-with-the-java-agent" target="_blank">custom instrumentation</a>. Specifically look towards the @Trace annotation, the NewRelic.setTransactionName() method, and NewRelic.setRequestAndResponse() method, which will allow you to <a title="New Relic Docs: Monitoring Java Background Processes" href="https://newrelic.com/docs/java/monitoring-java-background-processes#web_tx" target="_blank">turn any block of code in to a web transaction</a>.</p>
<p><em>Q: Do you support Netty now?</em><br />
A: In part. As of today, we’re not announcing full support for Netty. Anything that works for you is fully unsupported. However, Play utilizes Netty so much of the work was done. We hope to announce something more in the future.</p>
<p><em>Q: Do you support Akka?</em><br />
A: Play utilizes Akka heavily for various concurrency and asynchronous operations, and as such we need to instrument it in order to trace complex, multithreaded Play transactions. However, that does not mean we generically support Akka in any environment. We continue to evaluate the best way to generically express complex async event flows and hope to share more in the future about our plans.</p>
<p><em>Q: How do you report asynchronous transactions?</em><br />
A: Because a Play controller can execute multiple database and web service requests concurrently, we need to express all of those actions in an easy-to-understand way. If you’re looking at a transaction trace, take note of the &#8220;timestamp&#8221; column. It will tell you when each component ran and help you understand the concurrency of your logical transaction. In cases where multithreading and async are used under the covers (i.e., when an incoming request is routed to your Play controller), we&#8217;ll minimize that data to make it easier for you to focus on your async application code.</p>
<p style="text-align: center;"><a title="App Server Breakdown" href="http://blog.newrelic.com/wp-content/uploads/appserverbreakdown.png" target="_blank"><img class="aligncenter  wp-image-13003" style="border: 1px solid black;" title="App Server Breakdown" alt="App Server Breakdown" src="http://blog.newrelic.com/wp-content/uploads/appserverbreakdown.png" width="629" height="293" /></a></p>
<p>For aggregate metrics over time, we represent every segment of the logical transaction in a simple time-series stackchart. Each segment in the stack represents time spent in a certain logical part of the transaction. <em>Note: </em>With async and parallelization, the sum of the individual parts can be greater than the total transaction time.</p>
<p><em>Q: What are your plans for Scala in general?</em><br />
A: We are very excited about Scala in general and are thrilled to be the first APM vendor to offer native Play 2 for Scala support. We’re continuing to evaluate other popular frameworks within the Scala ecosystem and will continue to add support for them as necessary. More importantly, we view this release as a major milestone as we now support Scala (for Play) on top of Java, Ruby, Python, PHP, and .NET.</p>
<p><em>Q: What about other JVM languages, such as Groovy?</em><br />
A: Although our initial focus with this release is Scala, rest assured that we&#8217;re also considering other JVM-based languages. The good news is that most of them are compatible with our Java API, meaning that you may already be able to use them with a small amount of custom instrumentation. That said, we understand the convenience of native support for frameworks and platforms within New Relic and we&#8217;ll continue to evaluate and add support for new technologies over time.</p>
<p>The post <a href="http://blog.newrelic.com/2013/06/05/new-relic-and-the-jvm-ecosystem/">New Relic and the JVM Ecosystem</a> appeared first on <a href="http://blog.newrelic.com">New Relic blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.newrelic.com/2013/06/05/new-relic-and-the-jvm-ecosystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
