Request Visualizer Tool
The
Request Visualizer Tool
allows you to capture the complete execution of a root request and perform detailed analysis.
This is a very powerful tool that allows you to fully understand request
processing - including whether sub-requests are fully processed or retrieve
representations from the internal cache.
To follow this tutorial it is best to have three browser windows or tabs open.
The first is displaying this page.
The second should display the
Control Panel
and the third displaying the
Request Visualizer
tool.
Normally, the tool is not actively capturing requests.
Request capture is a memory intensive operation and should be
turned on only as long as necessary to capture root requests of interest.
Usage Scenarios
The visualizer offers a very powerful view of the complete state of a running NetKernel system it can be used in the following situations:
- To test that a module address space is correctly defined - similar to using the request trace but with state.
- To test the expiry and caching of a resource
- To examine the dependencies of resources.
- To optimize requests and introduce caching.
- To visualize and understand the design of another developers address space/application
- For resource-level semantic debugging - when everything is linked and routing correctly but the data is wrong.
The visualizer is a powerful tool. It provides a very detailed view of the complete operation of a NetKernel application.
Use it during development to aid understanding of the application structure, during testing and optimization to enhance the operation
of a functional application, during project evolution to understand a module created by another team member.
Capturing Requests
The tool is easy to use.
To start the request capture process optionally enter a regular expression in the
"Request URI match" field to specify the URI of a root request
that should be captured.
(Leaving this empty will cause the tool to capture all requests)
and then press the "start" button.
Notice that the "start" button becomes the "stop" button.
Once you are certain that the requests of interest have occurred, press the "stop" button
and examine the list of captured root requests.
Example
Using the tool enter the regular expression
http://localhost:1060/book/tutorial/.*
and press the "start" button.
Then re-request this page of documentation in your browser.
Finally go back to the visualizer and press the "stop" button.
You should see a single root request for
http://localhost:1060/book/tutorial/doc_tutorial_development_request_visualizer
Notice that this is also a clickable link.
By clicking on the root request link you open the analysis part of the tool
for this specific request.
Analysis
The analysis capabilities of the Request Visualizer are discussed in detail
in the
Request Visualizer Documentation
.
In this section we will examine a few examples and discuss the results of
the analysis.
Example
Continuing with the example above, click on the root request
http://localhost:1060/book/tutorial/doc_tutorial_development_request_visualizer
to display the Trace Detail page.
Notice that there are three lines after the first root request line.
All of these say "from cache" which indicates that the documentation page has already been
formatted and saved in the internal cache.
To see the request with an empty cache first go to the control panel and select the
Hot Restart
tool.
Issue a hot restart and then switch back to Request Visualizer.
Start the capture of root request, again using the same regular expression used above,
re-request this page of documentation, go back to the Request Visualizer
and press the "stop" button.
Now when you press the link
http://localhost:1060/book/tutorial/doc_tutorial_development_request_visualizer
in the Request Visualizer you will get a Trace Detail page with many more entries.
This page now display the full extent of work required to create and format this page of
documentation in a browser.