<commit_before>﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_SignalTrace.aspx.cs" Inherits="Chat._SignalTrace" %>

<%@ Import Namespace="Chat" %>
<%@ Import Namespace="DynamicLINQ" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e) {
        Logs.DataSource = Filter(TraceHelper.Logs
                                            .Keys
                                            .OrderByDescending(p => p.When)
                                            .Take(100)
                                            .OrderBy(p => p.When)
                                            .AsQueryable());
        Logs.DataBind();
    }

    private IEnumerable<LogInfo> Normalize(IEnumerable<LogInfo> logs) {
        return from l in logs
               group l by new { l.Message, l.ThreadId } into g
               let i = g.Last()
               let count = g.Count()
               select new LogInfo {
                   Category = i.Category,
                   ClientId = i.ClientId,
                   Message = i.Message + (count > 1 ? " (aggregated " + g.Count() + ")" : ""),<commit_msg>Filter before paging >_<<commit_after>﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_SignalTrace.aspx.cs" Inherits="Chat._SignalTrace" %>

<%@ Import Namespace="Chat" %>
<%@ Import Namespace="DynamicLINQ" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e) {
        Logs.DataSource = Filter(TraceHelper.Logs.Keys.AsQueryable())
                                            .OrderByDescending(p => p.When)
                                            .Take(100)
                                            .OrderBy(p => p.When);
        Logs.DataBind();
    }

    private IEnumerable<LogInfo> Normalize(IEnumerable<LogInfo> logs) {
        return from l in logs
               group l by new { l.Message, l.ThreadId } into g
               let i = g.Last()
               let count = g.Count()
               select new LogInfo {
                   Category = i.Category,
                   ClientId = i.ClientId,
                   Message = i.Message + (count > 1 ? " (aggregated " + g.Count() + ")" : ""),
{'fraction_non_alphanumeric': 0.11910215300045808, 'fraction_numerical': 0.0036646816307833257, 'mean_word_length': 1.4539325842696629, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4515579', 'n_tokens_mistral': 584, 'n_tokens_neox': 551, 'n_words': 129}