Index: trunk/mwsearch/Daemon/Daemon.cs |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | |
123 | 123 | int threadCount = Worker.OpenCount; |
124 | 124 | if (threadCount > maxWorkers) { |
125 | | - stats.Add(false, DateTime.UtcNow, 0, threadCount); |
| 125 | + stats.Add(false, 0, threadCount); |
126 | 126 | log.Error("too many connections, skipping a request"); |
127 | 127 | } else { |
128 | 128 | Worker worker = new Worker(client.GetStream(), config); |
Index: trunk/mwsearch/Daemon/Worker.cs |
— | — | @@ -358,7 +358,7 @@ |
359 | 359 | |
360 | 360 | void LogRequest(String searchterm, Query query, int numhits, DateTime start) { |
361 | 361 | TimeSpan delta = DateTime.UtcNow - start; |
362 | | - Daemon.stats.Add(true, start, delta.Milliseconds, OpenCount); |
| 362 | + Daemon.stats.Add(true, delta.Milliseconds, OpenCount); |
363 | 363 | log.InfoFormat("{0} {1}: query=[{2}] parsed=[{3}] hit=[{4}] in {5}ms", |
364 | 364 | what, dbname, searchterm, query.ToString(), numhits, delta.Milliseconds); |
365 | 365 | } |
Index: trunk/mwsearch/Daemon/Statistics.cs |
— | — | @@ -74,7 +74,7 @@ |
75 | 75 | return time.Ticks / 10000L; |
76 | 76 | } |
77 | 77 | |
78 | | - public void Add(bool status, DateTime time, long delta, int threads) { |
| 78 | + public void Add(bool status, long delta, int threads) { |
79 | 79 | lock (locker) { |
80 | 80 | end++; |
81 | 81 | if (end == maxItems) |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | usedItems++; |
89 | 89 | } |
90 | 90 | handled[end] = status; |
91 | | - times[end] = millis(time); |
| 91 | + times[end] = millis(DateTime.UtcNow); |
92 | 92 | deltas[end] = delta; |
93 | 93 | activeThreads[end] = threads; |
94 | 94 | } |