sitecorian/SitecoreSearchContrib — pull request #23 by PetersonDave (2013-05-18 04:13:25+00:00)
Title: Advanced Database Crawler Lucene Tracing Utility

**Project Goal:**

Provide a tool to debug Lucene queries by rendering the executed queries to the rendered page. This tool should only be used for debugging and testing purposes only. Not meant for a production environment.

**Features**
- Lucene queries captured in trace rendered in output window, descending by date.
- Execution date, time in ms and query displayed in output window.
- Expand/collapse button to hide/show output window.
- Clear button to empty Lucene trace output from provider (session).

**Project Contents:**

1. QueryRunnerTrace.cs - QueryRunner wrapper, saving all Lucene query text to the query trace provider specified.
2. QueryTraceScope.cs - Manages monitoring of query activity.
3. QueryTraceScopeSessionProvider.cs - Session provider for saving of queries executed against Lucene.
4. LucenePorfiler.cs - Web Control that presents the captured Lucene queries.

Other files provide support via helper methods, embedded web control resources, and an interface for additional provider implementations, when necessary.

**How to Use:**

Using the tracing utility is easy to use, by following the steps below:

1. Add a reference to the project scSearchContrib.Profiler.
2. Use QueryRunnerTrace to execute ADC searches.
3. Add an instance of LuceneProfiler.cs web control to the desired page/rendering:

```
<%@ Register TagPrefix="uc" Namespace="scSearchContrib.Profiler.UI" Assembly="scSearchContrib.Profiler" %>

```

**Example Output:**

![image](https://f.cloud.github.com/assets/696370/521126/961cde82-bf70-11e2-9434-740bf44db25a.png)