-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
26 lines (25 loc) · 863 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Diagnostics;
using System.Linq;
namespace XPathSearch
{
class Program
{
static void Main(string[] args)
{
var configProvider = new ConfigProvider();
var xPathNodeCounter = new XPathNodeCounter(configProvider);
Stopwatch sw = Stopwatch.StartNew();
const int count = 100;
for (int i = 0; i < count; i++)
{
IOrderedEnumerable<WordCount> valueCountsOrdered = xPathNodeCounter.GetNodeValueCountsOrdered();
foreach (WordCount wordCount in valueCountsOrdered)
{
Console.WriteLine("Word: {0}, Count: {1}", wordCount.Key, wordCount.Count);
}
}
Console.WriteLine("Elapsed: {0}", sw.ElapsedMilliseconds / (double)count);
}
}
}