PerfVis

Installation Guide

This section provides a guide to set up the different parts of the visualization and configure them correctly. You need to set up 4 parts for the visualization to work: The Pharo environemt, the webserver, the Unity Project and the HoloLens. The setup can be run in two different ways:

  1. The Pharo environemt, the webserver and the Unity Project running on the same machine.
  2. The webserver and Pharo environment on one machine and the Unity project on another.

Perfvis_setup2 Two ways to set up PerfVis

No matter which setup you choose, the instructions stay the same. These instructions result in a visualization of the Roassal2 Library in Pharo. We assume that the reader has basic knowledge in the navigation of C-Sharp, Pharo Code and the command line interface.

Required Tools

For the visualization to work you will require:

  1. HoloLens
  2. Computer running Windows, build 14318 or later
  3. Wireless network
  4. (Optional) Another computer

Make sure that all machines are in the same wireless network.

Install Tools and Environments

Pharo Environment

  1. Download a new Pharo image and VM if necessary
  2. Install Spy2 through the Catalog Browser
  3. Open the Monticello Browser, click +Repository and select smalltalkhub.com
  4. Enter owner: merino and project: SpyToHolo and select OK
  5. Select Spy2-Examples-LeonelMerino.49.mcz and click Load
  6. Open the System Browser and select Spy-Examples > Counting > S2C > visualization > recordData:
  7. Set the file reference to your prefered save location, for example ’Users/hess/Desktop/city-colors.csv’
  8. Open a new Playground and write
	profiler := S2C new.
	profiler startOnPackageNamed: 'Roassal2'.
	profiler animatedVisualization.
  1. Select the three lines and Inspect It
  2. After a moment the Inspector opens, Spy2 is now monitoring
  3. To stop Spy2, run S2Profiler remove

Perfvis_pharo_setup Code reference for the save location of the pharo file

Webserver

For the webserver we will use Python, since it offers an easy to set up webserver to serve from the filesystem, but any other webserver work as well. The webserver needs to be running on the same machine as the Pharo Environment.

  1. Aquire a distribution of Python and install it
  2. In your Console, navigate to the location you set the save location to earlier, in our example ’Users/hess/Desktop’
  3. Run py -m http.server 8000 in the Console
  4. Remember the IP address and port of the webserver, for example 192.168.2.3:8000

Unity Project & HoloLens

  1. Download Unity 2017.3.0b8
  2. Download the Unity project from href{...}{to be added} and open it
  3. In Unity, select the Cube GameObject, and set the URL variable of the UpdateData.cs component to {webserver IP-address}/{file name}, in our example 192.168.2.3:8000/city-colors.csv
  4. On your HoloLens, go to the Microsoft Store and install the Holographic Remoting Player.
  5. On your HoloLens, start the Holographic Remoting Player.
  6. In Unity, go to the Window menu and select Holographic Emulation
  7. Set Emulation Mode to Remote to Device and enter your HoloLens’ IP address for Remote Machine
  8. Click Connect. The Connection Status should change to Connected and the screen in your HoloLens should go blank

Running the Visualization

The different parts should now be connected and configured properly. Before entering play mode make sure that the Inspector Window in Pharo is not minimized and visible. Otherwise the metrics will not be updated.

You can now enter Play Mode in Unity. After a couple seconds you should see the visualization. You will notice that there are always two classes active. We suspect this is due to the Inspector Window, which needs to be open and displaying the metrics, for those to also be written to the file.

An easy way to stress Roassal2 is to the World Menu > Roassal > Roassal Examples, select any category and play around with some examples.

Apendix

  • Git Repository with source code: git://scg.unibe.ch/project-hess-holo-2018
Last changed by hess on 14 January 2019