{jenkins-plugin-info:tag-profiler|jiraComponent=tag-profiler|sourceDir=tag-profiler-plugin}

Tag Profiler Plugin

This plugin is aimed at plugin developers. It allows you to profile different sections of jelly tags in order to identify response bottlenecks.

By default this plugin will profile all requests. To profile a specific part of a page just surround that part of the page with a <p:profile name="...">...</p:profile> tag, e.g.

<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout"
         xmlns:f="/lib/form" xmlns\:p="/lib/profile">
  <l:layout title="${it.displayName}">
    <p:profile name="side-panel">
      <st:include page="sidepanel.jelly"/
    </p:profile>
    <p:profile name="main-panel">
      ...
    </p:profile>
  </l:layout>
</j:jelly>

You can also use the profiler from within your code, e.g.

import org.jenkinsci.plugins.tagprofiler.ProfileStats;
...
    ProfileStats.enter("critical");
    try {
        ...
    } finally {
        ProfileStats.leave();
    }

The profiling results are available from the /tag-profiler root action. They look something like this:
The Reset button will reset the current measurements. The ± value is the standard error of the mean.

Tips & Tricks

Version History

Version 0.2 (2013-02-15)

Version 0.1 (2013-02-15)