Skip to content

Commit f3cf31f

Browse files
committed
added memory leak test
1 parent ad1d4a9 commit f3cf31f

File tree

7 files changed

+1502
-6
lines changed

7 files changed

+1502
-6
lines changed

Assets/Testing/AWS1HourTest.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using System;
5+
6+
public class AWS1HourTest : MonoBehaviour
7+
{
8+
9+
public Transform moveable;
10+
11+
public UnityEngine.UI.Text fps;
12+
public UnityEngine.UI.Text uptime;
13+
public UnityEngine.UI.Text trials;
14+
15+
16+
void Update()
17+
{
18+
moveable.position = new Vector3(UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f), UnityEngine.Random.Range(-10f, 10f));
19+
fps.text = string.Format("{0:0}FPS", 1.0f / Time.smoothDeltaTime);
20+
21+
TimeSpan t = TimeSpan.FromSeconds(Time.time);
22+
23+
uptime.text = string.Format("{0:D2}h, {1:D2}m, {2:D2}s",
24+
t.Hours,
25+
t.Minutes,
26+
t.Seconds);
27+
}
28+
29+
public void CreateTrials()
30+
{
31+
UXF.Session.instance.CreateBlock(500);
32+
UXF.Session.instance.BeginNextTrial();
33+
}
34+
35+
public void BeginTrialTimer()
36+
{
37+
trials.text = string.Format("Trial {0}", UXF.Session.instance.currentTrialNum.ToString());
38+
UXF.Session.instance.Invoke("EndCurrentTrial", 30f);
39+
}
40+
41+
}

Assets/Testing/AWS1HourTest.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)