Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
profiling instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunderl committed Apr 16, 2019
1 parent 56a7c11 commit dc6c738
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc-source/assets-hosts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Amazon Sumerian Hosts<a name="assets-hosts"></a>

A host is a asset provided by Sumerian that has built in animation, speech, and behavior for interacting with users\. Use hosts to engage users in conversation and convey information\.
A host is an asset provided by Sumerian that has built in animation, speech, and behavior for interacting with users\. Use hosts to engage users in conversation and convey information\.

![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/hosts.png)

Expand Down
3 changes: 2 additions & 1 deletion doc-source/dashboard-scenes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ If you click on the name of the scene or double\-click the thumbnail, the scene
+ **Tags** – Add tags to the scene for use with filters\.
+ **Actions**
+ **Open** – Open the scene in the Sumerian editor\.
+ **View published** – Open the published version of the scene hosted in Amazon CloudFront\.
+ **View published**\(public scenes\) Open the published version of the scene hosted in Amazon CloudFront\.
+ **Download Amplify JSON**\([private scenes](editor-publish.md)\) Download the Amplify configuration file\.
+ **Move** – Move the scene to a different project\.
+ **Copy** – Copy the scene to a different project\.
+ **Duplicate** – Create a copy of the scene in the same project\.
Expand Down
4 changes: 3 additions & 1 deletion doc-source/editor-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ Organize your entities by their physical or logical relationship to other entiti
+ ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/entities-icons-hide.png) – Hide or show an entity in the canvas\.
+ ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/entities-icons-duplicate.png) – Duplicate an entity\.
+ ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/entities-icons-trash.png) – Delete an entity\.
+ ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/entities-icons-undo.png) – Undo or redo changes\.
+ ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/entities-icons-undo.png) – Undo or redo changes\.

Double click an entity's name to rename it\. Double click the entity's icon to frame it in the canvas\.
5 changes: 3 additions & 2 deletions doc-source/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Amazon Sumerian User Guide

-----
*****Copyright &copy; 2018 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****
*****Copyright &copy; 2019 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.*****

-----
Amazon's trademarks and trade dress may not be used in
Expand Down Expand Up @@ -93,4 +93,5 @@ Amazon's trademarks and trade dress may not be used in
+ [Parameters and Arguments](scripting-parameters.md)
+ [External Dependencies](scripting-dependencies.md)
+ [Debugging](scripting-debugging.md)
+ [Troubleshooting Issues with Amazon Sumerian Scenes](sumerian-troubleshooting.md)
+ [Troubleshooting Issues with Amazon Sumerian Scenes](sumerian-troubleshooting.md)
+ [Profiling Amazon Sumerian Scenes](troubleshooting-profiling.md)
4 changes: 2 additions & 2 deletions doc-source/scene-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you don't have an identity pool, follow the instructions under [Amazon Sumeri
1. Choose the root node in the **Entities** panel\.
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/editor-entities-scene.png)

1. Expand the **AWS Configuration** section in the inspector panel\.
1. Expand the **AWS configuration** section in the inspector panel\.

1. Enter an Amazon Cognito identity pool ID\.
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/scene-sections-aws.png)
Expand Down Expand Up @@ -40,4 +40,4 @@ var setup = function(args, ctx) {
true
);
};
```
```
2 changes: 1 addition & 1 deletion doc-source/scripting-parameters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Parameters and Arguments<a name="scripting-parameters"></a>

Parameters let you create scripts that are customizable by adding fields to the script properties in the editor\. For example, the following script defines a parameter named `Velocity` that takes 3 numbers \(a [`vec3` parameter](#scripting-parameters-types)\)\.
Parameters let you create scripts that are customizable by adding fields to the script properties in the editor\. For example, the following script defines a parameter named `Velocity` that takes 3 numbers \(a [`vec3` parameter](#scripting-parameters-types)\)\. The setup function gets the value of the parameter from the `args` object\.

```
var setup = function(args, ctx){
Expand Down
3 changes: 0 additions & 3 deletions doc-source/statemachines-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ You can use state machine actions in Amazon Sumerian to run [scripts](sumerian-s
Logic actions perform calculations, run scripts, or interact with the page document\.

**Logic Actions**
+ **Compare counter** and **Compare 2 counters** – Compare a counter with a set value, or compare the value of two counters\.
+ **DOM listen** – Add a DOM event listener on one or many elements \(specified by a query selector\), and perform a transition on a given event\.
+ **Emit message** – Emit a message \(a ping\) to a channel on the bus\. Messages can be listened to by the **Listen** transition action, or by scripts using the `SystemBus.addListener(channel, callback)` function\.
+ **Execute script** – Run a [script](sumerian-scripting.md), and transition on success or failure\. Use the `enter` and `exit` functions in your script to run code when the state is entered and exited\. To trigger a transition, call `ctx.transitions.success()` or `ctx.transitions.failure()` on [the context object](scripting-context.md)\.
+ **Execute script condition** – Evaluate an expression, and transition on a true or false result\.
+ **Execute script expression** – Execute a statement\.
+ **Get HTML text** and **Set HTML text** – Read or change the contents of an HTML element\.
+ **Increment counter** – Increment a counter with a value\.
+ **Log message** – Print a message in the debug console of your browser\.
+ **Set counter** – Change a counter to a value\.
+ **Toggle full screen** – Expand the scene to fill the screen\. For browsers to allow this, the previous state must have a [Click or tap on entity](statemachines-controls.md) action that transitions to the state that runs this action\.

Timeline actions interact with the entity's timeline component\.
Expand Down
45 changes: 45 additions & 0 deletions doc-source/troubleshooting-profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Profiling Amazon Sumerian Scenes<a name="troubleshooting-profiling"></a>

You can use browser performance analysis tools to measure your Amazon Sumerian scene's performance during playback and to identify issues\. For additional insight, you can use a cookie to configure Sumerian to record detailed timing information about the engine's update and render loops for each frame\.

Use [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/) to set the cookie and profile your scene\.

**To profile a scene in Chrome**

1. Open a scene in the Sumerian editor\.

1. In the **Entities** panel, choose the root node of your scene to access [scene settings](sumerian-scene.md)\. In the scene panel, expand the **Details** section, and then choose **View scene** to open the scene in a new tab\.

1. Open the **Console** panel in Chrome DevTools as follows:
+ Windows, Linux, Chrome – Ctrl Shift J
+ Mac – Command Option J

1. To set the cookie, run the following statement at the console prompt\.

```
document.cookie = 'sumerianProfiling=useSystemTimingMarks;path=/'
```

1. Reload the page\.

1. Choose **Performance** in the navigation bar of the DevTools panel\.

1. Click the record button to start a recording\. Use your scene for a few seconds, and then click the record button again to stop recording\.

1. The top section of the performance graph shows the scene's frames per second \(FPS\) in green\. Locate a section where the frame rate dropped\. Click and drag to zoom in on a few frames\.

![\[Performance testing a Sumerian scene.\]](http://docs.aws.amazon.com/sumerian/latest/userguide/images/devtools-performance.png)

The Sumerian profiling information appears under **User Timing**\. Each frame has an **updateWorld** phase, where the engine logic runs, and a **render** phase, where the user's view of the world is generated\.

Under the **updateWorld** section, a second timeline shows the timings for each subsystem that's engaged by the engine during this phase\. Use this information to identify components in your scene, like scripts and state machines, that take a long time to update\. If the render phase is too long, reduce the visual complexity of your scene or reduce the number of lights\.

When detailed profiling is enabled, the Sumerian engine uses additional resources\. When you're done profiling, unset the cookie to disable it\.

```
document.cookie = 'sumerianProfiling=;path=/'
```

For Oculus Go and other Android devices, put your device in developer mode and connect to it from the **DevTools** menu\. For Oculus Go, see [Device Setup \- Oculus Go](https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-device-setup-go/)\. For other devices, see [Get Started with Remote Debugging Android Devices](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/)\.

For Firefox, you can use the Gecko Profiler Add\-on\. Use the same commands in the browser console to set and unset the cookie\. See [Profiling with the Gecko Profiler](https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler) for more information\.

0 comments on commit dc6c738

Please sign in to comment.