Example #1
0
        void CellGUI(Rect cellRect, TestListTableItem item, MyColumns column, ref RowGUIArgs args)
        {
            // Center cell rect vertically (makes it easier to place controls, icons etc in the cells)
            CenterRectUsingSingleLineHeight(ref cellRect);

            switch (column)
            {
            case MyColumns.Index:
                EditorGUI.LabelField(cellRect, string.Format("{0}", item.index));
                break;

            case MyColumns.Name:
                EditorGUI.LabelField(cellRect, string.Format("{0}", item.displayName));
                break;

            case MyColumns.SampleCount:
                EditorGUI.LabelField(cellRect, string.Format("{0}", item.performanceTest.SampleGroups.Count));
                break;

            case MyColumns.Deviation:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.deviation));
                break;

            case MyColumns.StandardDeviation:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.standardDeviation));
                break;

            case MyColumns.Median:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.median));
                break;

            case MyColumns.Min:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.min));
                break;

            case MyColumns.Max:
                EditorGUI.LabelField(cellRect, string.Format("{0:f2}", item.max));
                break;
            }
        }
Example #2
0
        protected override TreeViewItem BuildRoot()
        {
            int idForhiddenRoot    = -1;
            int depthForHiddenRoot = -1;
            TestListTableItem root = new TestListTableItem(idForhiddenRoot, depthForHiddenRoot, "root", null);

            var results = m_testReportWindow.GetResults();

            if (results != null)
            {
                int index = 0;
                foreach (var result in results.Results)
                {
                    var item = new TestListTableItem(index, 0, result.Name, result);
                    root.AddChild(item);

                    // Maintain index to map to main markers
                    index += 1;
                }
            }

            return(root);
        }