Skip to content

Commit d347bb0

Browse files
committed
Remove logging statements
1 parent b63667d commit d347bb0

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

frameworks/keyed/blazor-wasm/src/App.razor.cs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@ namespace blazor_wasm
66
{
77
public partial class App
88
{
9-
string lastMeasure;
10-
Stopwatch Stopwatch;
11-
12-
void StartMeasure(string name)
13-
{
14-
Stopwatch = Stopwatch.StartNew();
15-
lastMeasure = name;
16-
}
17-
18-
void StopMeasure()
19-
{
20-
Stopwatch.Stop();
21-
var last = this.lastMeasure ?? "";
22-
if (!string.IsNullOrWhiteSpace(this.lastMeasure))
23-
{
24-
lastMeasure = string.Empty;
25-
Console.WriteLine($"{last} took {Stopwatch.ElapsedMilliseconds} ms");
26-
Stopwatch.Reset();
27-
}
28-
}
29-
309
List<Data> data = new List<Data>();
3110
int selected;
3211
int id = 1;
@@ -64,62 +43,46 @@ List<Data> BuildData(int count = 1000)
6443

6544
public void Select(Data item)
6645
{
67-
StartMeasure("select");
6846
this.selected = item.Id;
6947
}
7048

7149
void Delete(Data item)
7250
{
73-
StartMeasure("delete");
7451
this.data.Remove(item);
7552
}
7653

7754
void Run()
7855
{
79-
StartMeasure("run");
8056
this.data = this.BuildData();
8157
}
8258
void Runlots()
8359
{
84-
StartMeasure("runlots");
8560
this.data = this.BuildData(10000);
8661
}
8762
void Add()
8863
{
89-
StartMeasure("add");
9064
this.data.AddRange(this.BuildData(1000));
9165
}
9266
void Update()
9367
{
94-
StartMeasure("update");
9568
for (var i = 0; i < this.data.Count; i += 10)
9669
{
9770
this.data[i].Label += " !!!";
9871
}
9972
}
10073
void Clear()
10174
{
102-
StartMeasure("clear");
10375
this.data = new List<Data>();
10476
this.selected = 0;
10577
}
10678
void SwapRows()
10779
{
108-
StartMeasure("swapRows");
10980
if (this.data.Count > 998)
11081
{
11182
var a = this.data[1];
11283
this.data[1] = this.data[998];
11384
this.data[998] = a;
11485
}
11586
}
116-
117-
protected override void OnAfterRender(bool firstRender)
118-
{
119-
if (!firstRender)
120-
{
121-
this.StopMeasure();
122-
}
123-
}
12487
}
12588
}

0 commit comments

Comments
 (0)