X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debbugs.Rnw;h=9339991a7cbb662a9eff497ab5b00eace82c12ad;hb=9f395e3a4b0431f8198419a9aa856b91a51ba8c3;hp=66fd5fbd345c39433d3d6729349b692968a690c7;hpb=cb13c33515011d5e53eff62dbcc5e7458ac6b1ee;p=debbugs-presentations.git diff --git a/debbugs.Rnw b/debbugs.Rnw index 66fd5fb..9339991 100644 --- a/debbugs.Rnw +++ b/debbugs.Rnw @@ -11,6 +11,11 @@ \usepackage{wrapfig} \usepackage{fancybox} \usepackage{booktabs} +\usepackage{minted} +\usepackage{tcolorbox} +\usepackage{etoolbox} +\BeforeBeginEnvironment{minted}{\begin{tcolorbox}}% +\AfterEndEnvironment{minted}{\end{tcolorbox}}% % \usepackage{multirow} \usepackage{acronym} \usepackage{qrcode} @@ -33,6 +38,7 @@ % \setbeamercovered{transparent} } +\setbeamertemplate{navigation symbols}{}%remove navigation symbols \usepackage[nomargin,inline,draft]{fixme} \usepackage{listings} @@ -43,8 +49,8 @@ \end{tikzpicture}} \author{Don Armstrong} \title{Debbugs} -\subtitle{Database Ho!} -%\date{August 11th, 2008} +\subtitle{22 Years of Bugs} +\date{August 10th, 2017} \titlegraphic{\includegraphics[height=0.2\textheight,keepaspectratio]{figures/openlogo-crop.pdf}} \subject{BTS} @@ -73,16 +79,16 @@ % - release to experimental -<>= +<>= library(lattice) library(xtable) library(ggplot2) library("scales") library(reshape2) library("data.table") -opts_chunk$set(dev="cairo_pdf",out.width="\\textwidth",out.height="0.8\\textheight",out.extra="keepaspectratio",fig.width=6,fig.height=4) +opts_chunk$set(dev="cairo_pdf",out.width="\\textwidth",out.height="0.8\\textheight",out.extra="keepaspectratio",fig.width=6/1.2,fig.height=4/1.2) opts_chunk$set(cache=TRUE, autodep=TRUE) -options(device = function(file, width = 6, height = 4, ...) { +options(device = function(file, width = 6/1.2, height = 4/1.2, ...) { cairo_pdf(tempfile(), width = width, height = height, ...) }) @@ -99,7 +105,10 @@ scientific_10 <- function(x) { %\setbeamercolor{frametitle}[bg=-red!90!green!10,fg=black] \frame[plain]{\titlepage - Source available at \url{http://git.donarmstrong.com/debbugs-presentations.git} + Code and slides are here: + \qrcode[padding]{https://dla2.us/p/debbugs2017} + \url{https://dla2.us/p/debbugs2017} + } % \begin{frame}{Debbugs} @@ -113,8 +122,7 @@ scientific_10 <- function(x) { \begin{columns} \column{0.5\textwidth} \begin{itemize} - \item Bug Statitics - \item Introduction to Debbugs + \item Bug Statistics \item New features \item Planned features \item Places you can help @@ -139,25 +147,56 @@ scientific_10 <- function(x) { \section{Bugs in Debian} \subsection{Bug Reporting Rate} -\begin{frame}{How many bugs do we have?} +\begin{frame}{Bugs from the beginning of time} \begin{center} <>= bug.growth <- fread("data/sorted_bug_growth_for_r_every_500.txt") colnames(bug.growth) <- c("time","bugs") bug.growth <- bug.growth[pmax(bugs) <= as.numeric(bugs),] +bug.growth <- bug.growth[order(time),] +while (bug.growth[,any(c(0,diff(bugs)) < 0)]) { + bug.growth <- + bug.growth[c(0,diff(bugs))>=0,] +} bug.growth[,date:= as.POSIXct(ISOdatetime(1970,1,1,0,0,0)+ as.numeric(bug.growth$time))] -print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),], +bug.growth[,`bugs per day`:=c(0,diff(bugs)/ + as.double(diff(date),"days")) + ] +print(ggplot(bug.growth,#[date > as.POSIXct(ISOdatetime(2005,1,1,0,0,0)),], aes(x=date,y=bugs))+ xlab("Time")+ylab("Bugs filed in Debian")+ scale_y_continuous(labels = scientific_10)+ - geom_point()+stat_smooth(method="lm")) + geom_point()) @ \end{center} \end{frame} -\begin{frame} +\begin{frame}[fragile]{Bug Growth Rate} +<>= +print(ggplot(bug.growth[date > as.POSIXct(ISOdatetime(2014,1,1,0,0,0)),], + aes(x=date,y=`bugs per day`))+ + xlab("Time")+ylab("Bugs filed per day") + + scale_y_log10(breaks=c(60,100,200,400,800)) + + geom_line()+stat_smooth(method="lm") + + geom_label(data=data.table(date=as.POSIXct(ISOdatetime(2015,04,25,0,0,0)),"bugs per day"=400),label="Jessie",color="red") + + geom_label(data=data.table(date=as.POSIXct(ISOdatetime(2017,06,17,0,0,0)),"bugs per day"=400),label="Stretch",color="purple") + ) +@ +\end{frame} + +\begin{frame}[fragile]{Is the bug filing rate decreasing?} +\tiny +<>= +summary(lm(log(`bugs per day`)~date, + bug.growth[date > "2014-01-01 PST",])) +@ +\normalsize +Not significantly decreasing. +\end{frame} + +\begin{frame}{My entries into Christian's game} \begin{columns} \column{0.5\textwidth} \begin{center} @@ -244,15 +283,6 @@ print(ggplot(rc.bugs.long[date > scale_color_discrete("Measure")) @ \end{center} - \setbeamercolor{postit}{fg=black,bg=yellow} - \begin{textblock}{4}(6,4) - \begin{onlyenv}<2> - \begin{beamercolorbox}[sep=1em,wd=5cm]{postit} - \centering \huge Too many RC bugs! - \end{beamercolorbox} - \end{onlyenv} - \end{textblock} - \end{frame} \section{Debbugs Structure and Infrastructure} @@ -271,17 +301,11 @@ print(ggplot(rc.bugs.long[date > \end{center} \end{frame} -\section{Database Ho!} - -\subsection{Overall Database Design} +\section{New Features} -\begin{frame}{Overall Database Design} - \begin{center} - \input{debbugs_layout_db} - \end{center} -\end{frame} +\subsection{Database} -\subsection{Perl Database Infrastucture} +\subsubsection{Perl Database Infrastucture} \begin{frame}{Perl Database Infrastructure} \begin{itemize} \item DBIx::Class @@ -292,62 +316,110 @@ print(ggplot(rc.bugs.long[date > \end{frame} -\subsection{SQL Design} -\begin{frame}{SQL Schema} - \includegraphics[width=\textwidth,keepaspectratio]{figures/schema.png} - \begin{itemize} - \item Current Debbugs SQL Schema - \end{itemize} -\end{frame} - -\subsubsection{dak SQL Design} -\begin{frame}{dak SQL Schema} - \includegraphics[width=\textwidth,keepaspectratio]{figures/dak_schema.png} - \begin{itemize} - \item Inspiration taken from dak SQL Schema where appropriate - \end{itemize} -\end{frame} - -\subsection{SQL Loading} +\subsubsection{SQL Loading} \begin{frame}[fragile]{SQL Loading} % SQL loading \begin{itemize} \item Load bugs -\begin{lstlisting}[language=sh] +\begin{minted}{sh} debbugs-loadsql bugs; debbugs-loadsql bugs archive; -\end{lstlisting} +\end{minted} \item Load Versioning information -\begin{lstlisting}[language=sh] +\begin{minted}{sh} debbugs-loadsql versions; debbugs-loadsql debinfo; -\end{lstlisting} +\end{minted} \end{itemize} \end{frame} -\subsection{SQL Working} -\begin{frame}[fragile]{SQL Working} - % example SQL query -\begin{lstlisting}[language=SQL] -SELECT count(*) FROM bug -WHERE last_modified > '2014-07-01' -AND done IS NOT NULL -AND owner IS NOT NULL; -\end{lstlisting} -\begin{visibleenv}<2> -\begin{lstlisting} - count +\subsubsection{Fun Queries} + +\begin{frame}[fragile]{Messages to bugs} +\small +\begin{minted}{sql} +SELECT count(*),c.addr FROM +message_correspondent mc +JOIN correspondent c ON mc.correspondent=c.id +WHERE correspondent_type='from' +GROUP BY mc.correspondent,c.addr +ORDER BY count DESC LIMIT 5; +\end{minted} +\begin{verbatim} + count | addr +-------+--------------------------------- + 5123 | bubulle@debian.org + 4346 | joeyh@debian.org + 4214 | biebl@debian.org + 3875 | tbm@cyrius.com + 3632 | ftpmaster@ftp-master.debian.org +\end{verbatim} +\end{frame} + +\begin{frame}[fragile]{Single-message correspondents} +\small +\begin{minted}{sql} +SELECT count (*) FROM +(SELECT count(*),c.addr + FROM message_correspondent mc + JOIN correspondent c ON + mc.correspondent=c.id + WHERE correspondent_type='from' + GROUP BY mc.correspondent, + c.addr + HAVING count(*) = 1) AS foo; +\end{minted} +\begin{verbatim} + count ------- - 521 -\end{lstlisting} -\end{visibleenv} + 30215 +\end{verbatim} +\end{frame} + + + +\begin{frame}[fragile]{More fun queries} +\begin{minted}{sql} +SELECT count(*),t.tag +FROM bug b +JOIN bug_tag bt ON b.id=bt.bug +JOIN tag t on bt.tag=t.id +GROUP by bt.tag,t.tag +ORDER by count DESC LIMIT 5; +\end{minted} +\begin{verbatim} + count | tag +--------+---------------- + 141184 | patch + 42288 | upstream + 39466 | sid + 33640 | l10n + 25566 | fixed-upstream +\end{verbatim} +\end{frame} + +\subsection{Database status caching} +\begin{frame}[fragile]{Status caching ``working''} +\begin{minted}{sql} +SELECT count(*),status +FROM bug_status_cache bsc +JOIN suite s ON bsc.suite=s.id +WHERE s.suite_name='unstable' +GROUP by status; +\end{minted} +\begin{verbatim} + count | status +--------+-------- + 514488 | fixed + 234155 | absent + 3923 | found +\end{verbatim} \end{frame} \subsection{Work still needed for SQL} \begin{frame}{Work Still needed for SQL} \begin{itemize} -\item Logfile loading (for full text searching) -\item Status Caching (for faster page loading) +\item Integration into CGI \item Testing \item Deployment \end{itemize}