hashCode = (hashCode * 397) ^ TotalPhysicalMemory.GetHashCode();
hashCode = (hashCode * 397) ^ AvailablePhysicalMemory.GetHashCode();
hashCode = (hashCode * 397) ^ ProcessMemorySize.GetHashCode();
hashCode = (hashCode * 397) ^ (ThreadName == null ? 0 : ThreadName.GetHashCode());
hashCode = (hashCode * 397) ^ (ThreadId == null ? 0 : ThreadId.GetHashCode());
DeduplicationBenchmarks_IdenticalExceptions, 116 runs
DeduplicationBenchmarks_IdenticalExceptions - 0.01ms
DeduplicationBenchmarks_LargeEventsFromFiles, 103 runs
DeduplicationBenchmarks_LargeEventsFromFiles - 0.30ms
DeduplicationBenchmarks_RandomExceptions, 110 runs
DeduplicationBenchmarks_RandomExceptions - 0.01ms
DeduplicationBenchmarks_IdenticalExceptions, 114 runs
DeduplicationBenchmarks_IdenticalExceptions - 0.01ms
DeduplicationBenchmarks_LargeEventsFromFiles, 214 runs
DeduplicationBenchmarks_LargeEventsFromFiles - 0.31ms
DeduplicationBenchmarks_RandomExceptions, 112 runs
DeduplicationBenchmarks_RandomExceptions - 0.01ms
DuplicateCheckerPlugin: Checking event: with hash: -1999577676
DuplicateCheckerPlugin: Checking event: with hash: -25846723
DuplicateCheckerPlugin: Checking event: with hash: -25846723
DuplicateCheckerPlugin: Checking event: with hash: -688792890
DuplicateCheckerPlugin: Checking event: with hash: -25846723
DuplicateCheckerPlugin: Checking event: with hash: -1999577676
DuplicateCheckerPlugin: Enqueueing event with hash:-1999577676 to cache.
DuplicateCheckerPlugin: Enqueueing event with hash:-25846723 to cache.
DuplicateCheckerPlugin: Enqueueing event with hash:-1999577676 to cache.
DuplicateCheckerPlugin: Enqueueing event with hash:-25846723 to cache.
DuplicateCheckerPlugin: Enqueueing event with hash:-688792890 to cache.
DuplicateCheckerPlugin: Enqueueing event with hash:-25846723 to cache.
^^ What’s wrong with that?
GetCollectionHashCode()
Checking event: with hash: 754157865 1407249123 GetException: 766225261 - ILOffset 8 - NativeOffset87
Checking event: with hash: 752981631 1924808933 GetException: 217121131 - ILOffset 0 - NativeOffset87
Checking event: with hash: 754157865 1407249123 GetException: 766225261 - ILOffset 8 - NativeOffset87
Checking event: with hash: 754157865 1407249123 GetException: 766225261 - ILOffset 8 - NativeOffset87
Checking event: with hash: 754157865 1407249123 GetException: 766225261 - ILOffset 8 - NativeOffset87
var error = context.Event.Data["@error"] as Exceptionless.Models.Data.Error;
context.Log.FormattedInfo(typeof(DuplicateCheckerPlugin), String.Concat("Checking event: ", context.Event.Message, " with hash: ", hashCode + " " + error.StackTrace.GetCollectionHashCode() +
" " + string.Join(", ", error.StackTrace.Select(x => x.Name + ": " + x.GetHashCode() + " - ILOffset " + x.Data["ILOffset"] + " - NativeOffset" + x.Data["NativeOffset"]))));
hashCode = (hashCode * 397) ^ (Data == null ? 0 : Data.GetCollectionHashCode(new[] { "ILOffset" }));
@trace
on Error.Data
_processed.Any()
is on IEnumerable, so that’s not threadsafe
.WithDateRange(utcStart, utcEnd, EventIndex.Fields.PersistentEvent.Date)
.WithIndices(utcStart, utcEnd, $"'{_eventIndex.VersionedName}-'yyyyMM”);
public async Task<NumbersTimelineStatsResult> GetNumbersTimelineStatsAsync(object query, IEnumerable<FieldAggregation> fields, TimeSpan? displayTimeOffset = null, int desiredDataPoints = 100) {
if (!displayTimeOffset.HasValue)
displayTimeOffset = TimeSpan.Zero;
// if no start date then figure out first event date
if (!filter.DateRanges.First().UseStartDate)
await UpdateFilterStartDateRangesAsync(filter, utcEnd).AnyContext();
utcStart = filter.DateRanges.First().GetStartDate();
utcEnd = filter.DateRanges.First().GetEndDate();
var interval = GetInterval(utcStart, utcEnd, desiredDataPoints);
var response = await Context.ElasticClient.SearchAsync<T>(CreateSearchDescriptor(query)
.SearchType(SearchType.Count)
.Aggregations(agg => BuildAggregations(agg
.DateHistogram("timelime", t => t
.Field(ev => ev.Date)
.MinimumDocumentCount(0)
.Interval(interval.Item1)
.TimeZone(HoursAndMinutes(displayTimeOffset.Value))
.Aggregations(agg2 => BuildAggregations(agg2, fields))
), fields))
.IgnoreUnavailable()
).AnyContext();
var range = (query as IDateRangeQuery)?.DateRanges?.FirstOrDefault();
var interval = GetInterval(range?.GetStartDate() ?? DateTime.MinValue, range?.GetEndDate() ?? DateTime.UtcNow.AddHours(1), desiredDataPoints);
var range = (query as IDateRangeQuery)?.DateRanges?.FirstOrDefault();
if (range == null || !range.UseDateRange)
throw new ArgumentOutOfRangeException(nameof(query), "Query must contain a valid date range.");
var interval = GetInterval(range.GetStartDate(), range.GetEndDate(), desiredDataPoints);