<commit_before>var Harpy=function(){function e(a){return-1!==a.indexOf("image")?"image":-1!==a.indexOf("html")?"html":-1!==a.indexOf("javascript")?"js":-1!==a.indexOf("css")?"css":-1!==a.indexOf("text")?"text":"other"}function c(a,c){switch(c){case "size":return 1024<a?(a=Math.round(a/102.4),a/10+" KB"):a+" B";case "time":return 1E3<a?(a=Math.round(a/10),a/100+" s"):a+" ms"}return a}function k(a,c,n){var d=a.length>c?"...":"";return n?d+(a.length>c?a.substr(a.length-c):a):a.substr(0,c)+d}function q(){return{time:{blocked:0,
    dns:0,connect:0,send:0,wait:0,receive:0},type:{image:0,html:0,js:0,css:0,text:0,other:0},uncached:{image:0,html:0,js:0,css:0,text:0,other:0},size:{cache:0,download:0}}}function l(a,c,n){var e,m,b,p,k,h,l,f;for(e in c)if(c.hasOwnProperty(e)){m=c[e];p=[["",""]];n&&(b=n[e],k=[["",""]]);for(h in m)m.hasOwnProperty(h)&&(p[p.length]=[h,0>m[h]?0:m[h]],b&&b.hasOwnProperty(h)&&(k[k.length]=[h,0>b[h]?0:b[h]]));for(l in d)d.hasOwnProperty(l)&&(g[e][l]=d[l]);m=document.createElement("DIV");m.className="harpyChart";
    document.getElementById(a).appendChild(m);p=google.visualization.arrayToDataTable(p);f=new google.visualization.PieChart(m);n&&(m=google.visualization.arrayToDataTable(k),p=f.computeDiff(m,p));f.draw(p,g[e])}}function a(a,c){var d=document.createElement("DIV");d.className="harpyChart";d.style.width="50%";document.getElementById(a).appendChild(d);var e=google.visualization.arrayToDataTable(c);(new google.visualization.BarChart(d)).draw(e,{colors:["#d9534f","#5cb85c"],legend:"none"})}var d={pieSliceTextStyle:{color:"#000"},
    chartArea:{top:30,left:10,bottom:30,right:10,width:300}},g={time:{colors:"#d9534f #F63 #F96 #9C9 #FC6 #5cb85c".split(" "),title:"Time"},type:{colors:["#CCC","#FFB","#FBF","#BBF","#FBB"],title:"Content"},uncached:{colors:["#CCC","#FFB","#FBF","#BBF","#FBB"],title:"Uncached content"},size:{colors:["#5cb85c","#d9534f"],title:"Cache profile"}};return{Viewer:function(a){function d(){function a(b,d){return Math.floor(Number(b.getAttribute(d))*c)}var c=$("#"+b+" th.timeline").width()/p.total,n=$("#"+b+" table.harpy div"),
    e=$("#"+b+" table.harpy div.loadMarker"),m=$("#"+b+" table.harpy>tbody").height()+"px";n.each(function(){this.hasAttribute("data-start")&&(this.style.marginLeft=a(this,"data-start")+"px");this.hasAttribute("data-time")&&(this.style.width=a(this,"data-time")+"px")});e.each(function(){var b=0,c=0;this.hasAttribute("data-dom")&&(b=a(this,"data-dom"));this.hasAttribute("data-page")&&(c=a(this,"data-page")-b);this.style.marginLeft=b+"px";this.style.width=c+"px";this.style.height=m})}function n(){l(b,h)}
    var g=this,m={},b=null;a=JSON.parse(a);var p=a.log.pages[0].pageTimings;p.total=p.onLoad;var t=new Date(a.log.pages[0].startedDateTime),h=q(),u,f,v,s,x,w;for(u=0;u<a.log.entries.length;u++){f=a.log.entries[u];f.harpy_info={};m[u]=f;v=f.request.url;0<u&&(v=v.replace(a.log.entries[0].request.url,""));s=e(f.response.content.mimeType);x=(new Date(f.startedDateTime)).getTime()+f.time;x>t.getTime()+p.total&&(p.total=x-t);for(w in f.timings)f.timings.hasOwnProperty(w)&&0<f.timings[w]&&(h.time[w]+=f.timings[w]);
        h.type[s]+=f.response.bodySize;h.uncached[s]+=f.response.bodySize;h.size.download+=f.response.bodySize;f.harpy_info.index=u+1;f.harpy_info.url=v;f.harpy_info.mimetype=s;f.harpy_info.cache="(cache)"===f.response.status?" cache":"";f.cache.hasOwnProperty("afterRequest")?(h.size.cache+=f.response.content.size,h.type[s]+=f.response.content.size,f.harpy_info.size=f.response.content.size):f.harpy_info.size=f.response.bodySize;f.harpy_info.startTime=new Date(f.startedDateTime)-t}t={};t.time=p;t.time.onContentLoad=
        p.onContentLoad||p.onLoad;t.size=h.size;a.log.pages[0].harpy_info=t;this.resize=d;this.showInfo=function(a){var b=a.getAttribute("data-id");f=m[b];f.info?f.info.style.display="none"===f.info.style.display?"table-row":"none":(b=document.createElement("TR"),b.innerHTML=Handlebars.templates.info(f),$(a).after(b),f.info=b);d()};this.draw=function(d){this.el=b=d;google.visualization?n():(google.load("visualization","1",{packages:["corechart"]}),google.setOnLoadCallback(n));d={};d["#"+b+" table.harpy>tbody>tr"]=
    {click:function(a,b){g.showInfo(b)}};Exos.enable([d,{window:{resize:function(){g.resize()}}}]);Handlebars.registerHelper("trimmer",k);Handlebars.registerHelper("format",c);Handlebars.registerPartial("timeline",Harpy.Templates.timeline);d=document.createElement("TABLE");d.innerHTML=Harpy.Templates.data(a);d.className="harpy";document.getElementById(b).appendChild(d);setTimeout(this.resize,1);$.tablesorter&&$("#"+b+">table").tablesorter({sortList:[[0,0]]})}},Comparator:function(c,d){function n(a){var b,
    c,d,n,m,f,g=a.log.pages[0].pageTimings;g.total=g.onLoad;var k=new Date(a.log.pages[0].startedDateTime),h=q();for(c=0;c<a.log.entries.length;c++){b=a.log.entries[c];d=b.request.url;n=e(b.response.content.mimeType);m=(new Date(b.startedDateTime)).getTime()+b.time;m>k.getTime()+g.total&&(g.total=m-k);for(f in b.timings)b.timings.hasOwnProperty(f)&&0<b.timings[f]&&(h.time[f]+=b.timings[f]);h.type[n]+=b.response.bodySize;h.uncached[n]+=b.response.bodySize;h.size.download+=b.response.bodySize;0<c&&d.replace(a.log.entries[0].request.url,<commit_msg>harpy update (bug fix)<commit_after>var Harpy=function(){function e(a){return-1!==a.indexOf("image")?"image":-1!==a.indexOf("html")?"html":-1!==a.indexOf("javascript")?"js":-1!==a.indexOf("css")?"css":-1!==a.indexOf("text")?"text":"other"}function c(a,c){switch(c){case "size":return 1024<a?(a=Math.round(a/102.4),a/10+" KB"):a+" B";case "time":return 1E3<a?(a=Math.round(a/10),a/100+" s"):a+" ms"}return a}function k(a,c,n){var d=a.length>c?"...":"";return n?d+(a.length>c?a.substr(a.length-c):a):a.substr(0,c)+d}function q(){return{time:{blocked:0,
    dns:0,connect:0,send:0,wait:0,receive:0},type:{image:0,html:0,js:0,css:0,text:0,other:0},uncached:{image:0,html:0,js:0,css:0,text:0,other:0},size:{cache:0,download:0}}}function l(a,c,n){var e,m,b,p,k,h,l,f;for(e in c)if(c.hasOwnProperty(e)){m=c[e];p=[["",""]];n&&(b=n[e],k=[["",""]]);for(h in m)m.hasOwnProperty(h)&&(p[p.length]=[h,0>m[h]?0:m[h]],b&&b.hasOwnProperty(h)&&(k[k.length]=[h,0>b[h]?0:b[h]]));for(l in d)d.hasOwnProperty(l)&&(g[e][l]=d[l]);m=document.createElement("DIV");m.className="harpyChart";
    document.getElementById(a).appendChild(m);p=google.visualization.arrayToDataTable(p);f=new google.visualization.PieChart(m);n&&(m=google.visualization.arrayToDataTable(k),p=f.computeDiff(m,p));f.draw(p,g[e])}}function a(a,c){var d=document.createElement("DIV");d.className="harpyChart";d.style.width="50%";document.getElementById(a).appendChild(d);var e=google.visualization.arrayToDataTable(c);(new google.visualization.BarChart(d)).draw(e,{colors:["#d9534f","#5cb85c"],legend:"none"})}var d={pieSliceTextStyle:{color:"#000"},
    chartArea:{top:30,left:10,bottom:30,right:10,width:300}},g={time:{colors:"#d9534f #F63 #F96 #9C9 #FC6 #5cb85c".split(" "),title:"Time"},type:{colors:["#CCC","#FFB","#FBF","#BBF","#FBB"],title:"Content"},uncached:{colors:["#CCC","#FFB","#FBF","#BBF","#FBB"],title:"Uncached content"},size:{colors:["#5cb85c","#d9534f"],title:"Cache profile"}};return{Viewer:function(a){function d(){function a(b,d){return Math.floor(Number(b.getAttribute(d))*c)}var c=$("#"+b+" th.timeline").width()/p.total,n=$("#"+b+" table.harpy div"),
    e=$("#"+b+" table.harpy div.loadMarker"),m=$("#"+b+" table.harpy>tbody").height()+"px";n.each(function(){this.hasAttribute("data-start")&&(this.style.marginLeft=a(this,"data-start")+"px");this.hasAttribute("data-time")&&(this.style.width=a(this,"data-time")+"px")});e.each(function(){var b=0,c=0;this.hasAttribute("data-dom")&&(b=a(this,"data-dom"));this.hasAttribute("data-page")&&(c=a(this,"data-page")-b);this.style.marginLeft=b+"px";this.style.width=c+"px";this.style.height=m})}function n(){l(b,h)}
    var g=this,m={},b=null;a=JSON.parse(a);var p=a.log.pages[0].pageTimings;p.total=p.onLoad;var t=new Date(a.log.pages[0].startedDateTime),h=q(),u,f,v,s,x,w;for(u=0;u<a.log.entries.length;u++){f=a.log.entries[u];f.harpy_info={};m[u]=f;v=f.request.url;0<u&&(v=v.replace(a.log.entries[0].request.url,""));s=e(f.response.content.mimeType);x=(new Date(f.startedDateTime)).getTime()+f.time;x>t.getTime()+p.total&&(p.total=x-t);for(w in f.timings)f.timings.hasOwnProperty(w)&&0<f.timings[w]&&(h.time[w]+=f.timings[w]);
        h.type[s]+=f.response.bodySize;h.uncached[s]+=f.response.bodySize;h.size.download+=f.response.bodySize;f.harpy_info.index=u+1;f.harpy_info.url=v;f.harpy_info.mimetype=s;f.harpy_info.cache="(cache)"===f.response.status?" cache":"";f.cache.hasOwnProperty("afterRequest")?(h.size.cache+=f.response.content.size,h.type[s]+=f.response.content.size,f.harpy_info.size=f.response.content.size):f.harpy_info.size=f.response.bodySize;f.harpy_info.startTime=new Date(f.startedDateTime)-t}t={};t.time=p;t.time.onContentLoad=
        p.onContentLoad||p.onLoad;t.size=h.size;a.log.pages[0].harpy_info=t;this.resize=d;this.showInfo=function(a){var b=a.getAttribute("data-id");f=m[b];f.info?f.info.style.display="none"===f.info.style.display?"table-row":"none":(b=document.createElement("TR"),b.innerHTML=Harpy.Templates.info(f),$(a).after(b),f.info=b);d()};this.draw=function(d){this.el=b=d;google.visualization?n():(google.load("visualization","1",{packages:["corechart"]}),google.setOnLoadCallback(n));d={};d["#"+b+" table.harpy>tbody>tr"]=
    {click:function(a,b){g.showInfo(b)}};Exos.enable([d,{window:{resize:function(){g.resize()}}}]);Handlebars.registerHelper("trimmer",k);Handlebars.registerHelper("format",c);Handlebars.registerPartial("timeline",Harpy.Templates.timeline);d=document.createElement("TABLE");d.innerHTML=Harpy.Templates.data(a);d.className="harpy";document.getElementById(b).appendChild(d);setTimeout(this.resize,1);$.tablesorter&&$(d).tablesorter({sortList:[[0,0]]})}},Comparator:function(c,d){function n(a){var b,c,d,n,m,
    f,g=a.log.pages[0].pageTimings;g.total=g.onLoad;var k=new Date(a.log.pages[0].startedDateTime),h=q();for(c=0;c<a.log.entries.length;c++){b=a.log.entries[c];d=b.request.url;n=e(b.response.content.mimeType);m=(new Date(b.startedDateTime)).getTime()+b.time;m>k.getTime()+g.total&&(g.total=m-k);for(f in b.timings)b.timings.hasOwnProperty(f)&&0<b.timings[f]&&(h.time[f]+=b.timings[f]);h.type[n]+=b.response.bodySize;h.uncached[n]+=b.response.bodySize;h.size.download+=b.response.bodySize;0<c&&d.replace(a.log.entries[0].request.url,
{'fraction_non_alphanumeric': 0.2826773915541511, 'fraction_numerical': 0.021258259120942258, 'mean_word_length': 12.220253164556961, 'pattern_counts': {'":': 22, '<': 19, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5885702', 'n_tokens_mistral': 4458, 'n_tokens_neox': 4377, 'n_words': 158}