-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23104d6
commit a86ea21
Showing
4 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.. _learn_advanced_commandline: | ||
|
||
Introduction | ||
============ | ||
|
||
One of the more useful, but slightly more advanced functionality of .Profile is the ability to launch your application | ||
from the command line with a selection of command line arguments allowing you to automatically start a custom recording | ||
session. This doesn't require any code on your side, which is precisely why this functionality is so amazing, it just | ||
works out of the box. | ||
|
||
Usage | ||
===== | ||
|
||
When you install .Profile, you also install a pre configured command line profile configuration. It's located in your | ||
project and called Framerate.pcfg. Feel free to open this and have a look at the format (it's plain Json). We'll use | ||
this bundled configuration to show you how .Profile can leverage out of the box command line profiling. | ||
|
||
.. warning:: .Profile ships with a link.xml file, this file tells unity not to strip out .Profile's assemblies when | ||
it builds a new player, it's important you have this link.xml file in your project prior to building | ||
your player. | ||
|
||
1) After installing .Profile, build a player for your desired platform. | ||
2) Run your player with the following command line arguments | ||
:: | ||
|
||
path/to/your/player.exe -DotProfileConfig "Framerate" | ||
|
||
And that's it, your application should be launched and a session will automatically be created using the Framerate.pcfg | ||
config. | ||
|
||
.. note:: You can create your own profile configuration files and ship them with your product, if you want to enable | ||
a user facing command line interface, allowing your customers the option to profile their existing game. | ||
Similar to how Valve ship a profiler with their hammer based products. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Advanced | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:name: toc-learn-advanced | ||
:glob: | ||
|
||
commandline.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,50 @@ | ||
Session | ||
======= | ||
|
||
Introduction | ||
------------ | ||
|
||
A session is a simple construct that refers to the start and end of a recording session. This recording session takes | ||
Probes as inputs and Processors as outputs (More on that in the coming pages). | ||
|
||
Managing a session | ||
------------------ | ||
|
||
A Session object is required to manage a session, a session can be constructed by hand, but we provide a simple | ||
interface for users to easily initialise a session. You can do this with the following steps. | ||
|
||
1) Add the required using | ||
|
||
.. code-block:: c# | ||
using WWellFired.Profile.Unity.Runtime; | ||
2) Tell your session to track the data you require. | ||
|
||
.. code-block:: c# | ||
var session = DotProfileSession.New(); | ||
Now you've got a session, you should start it when you want to start recording data. | ||
|
||
.. code-block:: c# | ||
session.StartRecording(); | ||
You can also tell your session to stop recording when you don't require it to record anymore. | ||
|
||
.. code-block:: c# | ||
session.StopRecording(); | ||
.. tip:: In these examples, we show you how to use and manage a single session, but it's important to mention you're | ||
not limited to just one, you can create as many as you want / need. | ||
|
||
Sessions will automatically stop recording when your application terminates, but we provide the functionality for you | ||
to stop them, in case you want to manage your sessions in a custom manor. | ||
|
||
Next up | ||
------- | ||
|
||
Sessions are a small topic, with not many functions, but they're the cornerstone of your recording process. We're going | ||
to teach you how to make them more useful in the coming pages. |