<commit_before>using System;
using System.Linq;

namespace ConsoleApp
{
    public class Program
    {
        public static void Main()
        {
            var random = new Random();
            using (var db = new BloggingContext())
            {
                new string[]
                {
                    "http://blogs.msdn.com/adonet",
                    "http://microsoft.com",
                    "https://github.com/dotnet/coreclr",
                    "https://github.com/aspnet/"
                }.ToList().ForEach(url => db.Blogs.Add(new Blog
                {
                    Url = url,
                    Posts = Enumerable.Range(1, random.Next(1, 4)).Select(r => new Post
                    {
                        Title = "Title" + random.Next(0, 999),
                        Content = "Content" + random.Next(0, 999)
                    }).ToList()
                }));
                var count = db.SaveChanges();

                Console.WriteLine("{0} records saved to database", count);
                Console.WriteLine("All blogs in database:");

                var blogs =
                    from b in db.Blogs
                    where b.Posts.Any()
                    select new {b.Url, b.Posts.First().Title};

                foreach (var blog in blogs)
                {
                    Console.WriteLine(string.Format("{0} - {1}", blog.Url, blog.Title));
                }
            }
        }
    }
}<commit_msg>update for sqlite benchmarks<commit_after>using System;
using System.Linq;
using System.Collections.Generic;
using Microsoft.Data.Entity;

namespace ConsoleApp
{
    public class Program
    {
        public static void Main()
        {
            using (var db = new BloggingContext())
            {
                db.Blogs.RemoveRange(db.Blogs);
                db.Posts.RemoveRange(db.Posts);
                db.SaveChanges();
                var start = DateTime.UtcNow;
                foreach (var index in Enumerable.Range(0, 100))
                {
                    var blog = new Blog();
                    blog.Url = Guid.NewGuid().ToString();
                    blog.Posts = new List<Post>();
                    foreach (var indexPost in Enumerable.Range(0, index % 20))
                    {
                        var post = new Post();
                        post.Title = Guid.NewGuid().ToString();
                        post.Content = Guid.NewGuid().ToString();
                        blog.Posts.Add(post);
                    }
                    db.Blogs.Add(blog);
                }
                var count = db.SaveChanges();
                var duration = (DateTime.UtcNow - start).TotalMilliseconds;
                Console.WriteLine("{0} records saved to database in {1} at {2} ms per record", count, duration, duration/count);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.11049146043917742, 'fraction_numerical': 0.008365284071104914, 'mean_word_length': 1.1530382595648911, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5069299', 'n_tokens_mistral': 763, 'n_tokens_neox': 682, 'n_words': 167}