New Features September 2014

We are rapidly approaching the end of the closed beta and want to share the latest features. The XHProf Improved blog posts have already hinted at some of them and now we want to explain how we integrated them into the UI.

Many of these features are still under development and we welcome all the feedback that you can provide.

Layers

Running Tideways Profiler in production will generate continuous insights of the application performance and for each individual transaction. To avoid drowning in data of millions of XHProf traces, we are using the new layer profiling mode to collect overall database, http, I/O and cache performance for every request.

You can view this data as a chart on the application dashboard or for every single transaction:

LayersLayers

There is also a small panel in both screens that shows the average performance of the layers in the selected time period:

We have implemented this for two reasons:

  • Running XHProf in production requires some overhead to gather profiling data
  • XHprof generates gigabytes of data very fast that is not very interesting in most of the cases, because it just measures the same nearly average performance over and over again.

The Profiler library generates traces based on a sample rate in percent configured by you. Layers is an additional feature on top of request measurements with microtime() that we are performing for every request when no XHProf trace is generated.

It allows insight into the performance of different layers of an application even when no full XHProf trace is generated, for a fraction of the impact.

SQL, Template and HTTP Call Timers

With the XHProf feature to collect arguments for function and method calls we can now collect timing information for SQL statements, templates (Twig and Smarty supported), filesystem APIs and HTTP calls via curl_exec.

Every trace then contains timer information in addition to the custom timers you can collect already:

TimersTimers

Errors

When measuring averages of a transaction errors should be accounted for. They might have extremely different code execution paths than their non-error counterparts.

Working on accounting for this skew we realized that monitoring errors was not far away and worked on this as a whole feature.

Tideways will log fatal errors and uncaught exceptions to the Error Dashboard. You can also see the error rate of your application and every individual transaction.

For every error you can then view the details of their occurance including a stack-trace:

ErrorsErrors

This works out-of-the-box when using Tideways library, however, depending on your framework, the results improve massively when you call the method TidewaysProfiler::logException when an exception occurs that leads to displaying a HTTP Status 500 screen.

This feature can be enabled in the settings tab of each application.

Compare Traces

With many different XHProf traces for each transaction, testing for improvements is possible when you start comparing them. We have only recently added this feature and are still working on improving its usability. The first prototype is available for every beta-tester right now.

Every trace can be compared against the average, slow and last trace of the same transaction. Comparisions are available from the detail screen of each trace.

The compare screen shows all functions that got slower and faster sorted by their importance.

Compare TracesCompare Traces

We will be working on making the compare screen more accessible.

Events

Comparing is equally important on the application level as it is on the detailed level of a trace. Events is a feature to compare the performance and error rate of your application before and after important events such as deployments, backups, server configuration changes, marketing campaigns, tv spots and anything you can imagine.

Create events from the web interface or with a simple REST API to gain insights in the performance before and after the event occured:

EventsEvents

You can use this feature when clicking on “Events” in your application or by sending a POST request with the following payload:

curl -X POST https://app.tideways.io/api/events -d '{
      "apiKey": "application api key here",
      "name":"Released version 1.2.3",
      "environment":"production",
      "type":"release"  }' 

Callgraphs

One highly requested feature is the callgraph function of the original XHProf.

We have added a slightly modified version of the callgraph that is part of XHGui last week. We would like to thank Mark and Paul for their work on XHGui and for making all their work on XHProf available.

CallgraphsCallgraphs

Callgraphs are available for all traces that are not yet pruned due to data-retention. You can view them for the full trace or starting with a controller or view as the root node.

Toby Toby 15.09.2014