Browse Source

Fixed build.

Deactivated CpuCyclesSpentSelf to reduce the number of queries.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5017 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
6f24d3c3fc
  1. 10
      src/AddIns/Misc/Profiler/Controller/Data/CallTreeNode.cs
  2. 2
      src/AddIns/Misc/Profiler/Controller/Data/ProfilingDataSQLiteProvider.cs
  3. 8
      src/AddIns/Misc/Profiler/Controller/Data/SQLiteCallTreeNode.cs

10
src/AddIns/Misc/Profiler/Controller/Data/CallTreeNode.cs

@ -84,18 +84,10 @@ namespace ICSharpCode.Profiler.Controller.Data @@ -84,18 +84,10 @@ namespace ICSharpCode.Profiler.Controller.Data
/// </summary>
public virtual long CpuCyclesSpentSelf {
get {
if (cpuCyclesSpentSelf == -1)
cpuCyclesSpentSelf = GetCpuCyclesSelf();
return cpuCyclesSpentSelf;
return CpuCyclesSpent - Children.Aggregate(0L, (sum, item) => sum + item.CpuCyclesSpent);
}
}
long GetCpuCyclesSelf()
{
return CpuCyclesSpent - Children.Aggregate(0L, (sum, item) => sum + item.CpuCyclesSpent);
}
/// <summary>
/// Gets the name of the method including namespace and class name.
/// </summary>

2
src/AddIns/Misc/Profiler/Controller/Data/ProfilingDataSQLiteProvider.cs

@ -311,7 +311,7 @@ namespace ICSharpCode.Profiler.Controller.Data @@ -311,7 +311,7 @@ namespace ICSharpCode.Profiler.Controller.Data
while (reader.Read()) {
SQLiteCallTreeNode node = new SQLiteCallTreeNode(reader.GetInt32(1), null, queryProvider);
node.callCount = reader.GetInt32(3);
node.cpuCyclesSpent = (ulong)reader.GetInt64(2);
node.cpuCyclesSpent = reader.GetInt64(2);
object ids = reader.GetValue(0);
if (ids is long) {
node.ids = new List<int> { (int)(long)ids };

8
src/AddIns/Misc/Profiler/Controller/Data/SQLiteCallTreeNode.cs

@ -23,7 +23,7 @@ namespace ICSharpCode.Profiler.Controller.Data @@ -23,7 +23,7 @@ namespace ICSharpCode.Profiler.Controller.Data
{
internal int nameId;
internal int callCount;
internal ulong cpuCyclesSpent;
internal long cpuCyclesSpent;
CallTreeNode parent;
SQLiteQueryProvider provider;
internal List<int> ids = new List<int>();
@ -64,9 +64,13 @@ namespace ICSharpCode.Profiler.Controller.Data @@ -64,9 +64,13 @@ namespace ICSharpCode.Profiler.Controller.Data
/// </summary>
public override long CpuCyclesSpent {
get{
return (long)this.cpuCyclesSpent;
return this.cpuCyclesSpent;
}
}
public override long CpuCyclesSpentSelf {
get { return 0; }
}
/// <summary>
/// Gets a reference to the parent of this CallTreeNode.

Loading…
Cancel
Save