Full code I used to get the amount and duration of AWS Lambda cold starts during 2 given months.
Also see the question on StackOverflow.
Full code I used to get the amount and duration of AWS Lambda cold starts during 2 given months.
Also see the question on StackOverflow.
| /// <remarks> | |
| /// Found in the Autofac documentation: http://docs.autofac.org/en/latest/examples/log4net.html | |
| /// </remarks> | |
| public class LoggingModule : Autofac.Module | |
| { | |
| private static void InjectLoggerProperties(object instance) | |
| { | |
| var instanceType = instance.GetType(); | |
| // Get all the injectable properties to set. |
| public static class Proxy<T> | |
| { | |
| private static readonly ChannelFactory<T> ChannelFactory = new ChannelFactory<T>("*"); | |
| public static void Execute(Action<T> serviceAction) | |
| { | |
| var proxy = (IClientChannel) ChannelFactory.CreateChannel(); | |
| var success = false; | |
| try | |
| { |
| // UPDATE! | |
| // In Json.NET 7, a DictionaryKeyResolver was added. | |
| // This might be able to fix the problem more elegantly. | |
| // I haven't checked though. | |
| public class DictionaryJsonConverter : JsonConverter | |
| { | |
| public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
| { | |
| var dictionary = (IDictionary)value; |