Skip to content

Instantly share code, notes, and snippets.

@AlgorithmsAreCool
Last active December 10, 2019 22:11
Show Gist options
  • Save AlgorithmsAreCool/68654a12ac7b9d2af49ac052985d556d to your computer and use it in GitHub Desktop.
Save AlgorithmsAreCool/68654a12ac7b9d2af49ac052985d556d to your computer and use it in GitHub Desktop.
Stack Trace of StackOverflow in Trill

Project File

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.Reactive" Version="4.3.1" />
    <PackageReference Include="trill" Version="2019.9.25.1" />
  </ItemGroup>

</Project>

Program.cs

using System;
using System.Reactive.Linq;
using Microsoft.StreamProcessing;

namespace TrillSOReplay
{
    class Program
    {
        static void Main(string[] args)
        {
            SensorReading[] historicData = new[] {
                new SensorReading { Time = 1, Value = 0 },
                new SensorReading { Time = 2, Value = 20 },
                new SensorReading { Time = 3, Value = 15 },
                new SensorReading { Time = 4, Value = 30 },
                new SensorReading { Time = 5, Value = 45 }, 
                new SensorReading { Time = 6, Value = 50 },
                new SensorReading { Time = 7, Value = 30 }, 
                new SensorReading { Time = 8, Value = 35 },
                new SensorReading { Time = 9, Value = 60 }, 
                new SensorReading { Time = 10, Value = 20 }
            };

            var streamable1 = historicData
                .ToObservable().ToTemporalStreamable(r => r.Time, r => r.Time + 1);

            var output = streamable1.TumblingWindowLifetime(3)
                   .Aggregate(
                   w => w.Count(),
                   w => w.Average(v => v.Value),
                   (count, avg) => new { Count = count, Avg = avg });

            Console.WriteLine("Output =");
            output.ToStreamEventObservable().ForEachAsync(e => Console.WriteLine(e)).Wait();
        }
    }
    internal class SensorReading
    {
        public int Time { get; internal set; }
        public int Value { get; internal set; }
    }
}
>	System.Private.CoreLib.dll!System.Collections.Concurrent.ConcurrentQueueSegment<System.__Canon>.TryEnqueue(System.__Canon item)	Unknown	Non-user code. Skipped loading symbols.
 	System.Private.CoreLib.dll!System.Collections.Concurrent.ConcurrentQueue<Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, <>f__AnonymousType0<ulong, double>>>.Enqueue(Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, <>f__AnonymousType0<ulong, double>> item)	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.Internal.Collections.StreamMessagePool<Microsoft.StreamProcessing.Empty, System.__Canon>.Return(Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, System.__Canon> item)	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.Internal.Collections.MemoryPool<Microsoft.StreamProcessing.Empty, System.__Canon>.Return(Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, System.__Canon> streamMessage)	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, System.__Canon>.Return()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.StreamMessage<Microsoft.StreamProcessing.Empty, System.__Canon>.Free()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
 	Microsoft.StreamProcessing.dll!Microsoft.StreamProcessing.SnapshotWindowTumblingPipeSimple<TrillSOReplay.SensorReading, Microsoft.StreamProcessing.Internal.StructTuple<ulong, Microsoft.StreamProcessing.Aggregates.AverageState<long>>, <>f__AnonymousType0<ulong, double>>.DisposeState()	Unknown	Non-user code. Skipped loading symbols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment