Permalink
Browse files

Initial version.

  • Loading branch information...
0 parents commit db2a89cdc09a55ecb8d1672fcd894f1ed6504738 @mrjbq7 mrjbq7 committed Apr 30, 2010
30 BUGS
@@ -0,0 +1,30 @@
+==========
+ Bugs
+==========
+
+* The base url is assumed to be "/".
+
+* Slow "code" pages::
+
+ select stats
+ 1) 0.102
+
+ select revs
+ 2) 2.251
+
+ select changes
+ 3) 12.224
+
+ select authors
+ 4) 17.281
+
+ select recent
+ 5) 17.222
+
+
+ ---
+
+ revisions = []
+ changes = []
+ - 9.406 secs
+
@@ -0,0 +1,2 @@
+Copyright (c) 2006-2008 Financial Asset Trading & Technology of California, LLC. All Rights Reserved in all media.
+
@@ -0,0 +1,18 @@
+#!/usr/bin/env make
+#
+# Makefile for building tracstats.
+#
+
+all: clean build
+
+build:
+ python setup.py build
+
+install:
+ python setup.py install
+ /etc/init.d/httpd restart
+
+clean:
+ rm -rf build dist
+
+
84 README
@@ -0,0 +1,84 @@
+===============
+ tracstats
+===============
+
+
+Description
+===========
+
+The 'tracstats' project is a plugin for the 'trac' project management tool.
+
+The 'tracstats' plugin adds a "Stats" tab to the trac project. Underneath this
+tab can be found statistics about subversion, wiki, and ticket system.
+
+
+Installation
+============
+
+The 'tracstats' plugin can be installed using standard::
+
+ python setup.py install
+
+
+Configuration
+=============
+
+It is configured in the trac.ini file by enabling and configuring:
+
+{{{
+[components]
+tracstats.* = enabled
+}}}
+
+
+Using trac 0.11
+===============
+
+It looks like changes made to move templates away from Clearsilver have
+introduced a regression where active navigation items are not highlighted
+properly.
+
+To reproduce, use a plugin that returns a Clearsilver template from its
+process_request() method. You will see that the "mainnav" navigation bar does
+not render the active item highlighted.
+
+The bug is that the CSS class "active" is not assigned to the list element in
+the navigation bar.
+
+The fix is to change trac/web/chrome.py::
+
+ class Chrome(component)
+ ...
+ def populate_hdf(self, req):
+ ...
+ for category, items in req.chrome['nav'].items():
+ + req.hdf['chrome.nav.%s' % category] = items
+ - for item in items:
+ - prefix = 'chrome.nav.%s.%s' % (category, item['name'])
+ - req.hdf[prefix] = item['label']
+
+And then change trac/templates/header.cs::
+
+ <?cs def:nav(items) ?><?cs
+ if:len(items) ?><ul><?cs
+ set:idx = 0 ?><?cs
+ set:max = len(items) - 1 ?><?cs
+ each:item = items ?><?cs
+ set:first = idx == 0 ?><?cs
+ set:last = idx == max ?><li<?cs
+ if:first || last || item.active ?> class="<?cs
+ if:item.active ?>active<?cs /if ?><?cs
+ if:item.active && (first || last) ?> <?cs /if ?><?cs
+ if:first ?>first<?cs /if ?><?cs
+ if:(item.active || first) && last ?> <?cs /if ?><?cs
+ if:last ?>last<?cs /if ?>"<?cs
+ + /if ?>><?cs var:item.label ?></li><?cs
+ - /if ?>><?cs var:item?></li><?cs
+ set:idx = idx + 1 ?><?cs
+ /each ?></ul><?cs
+ /if ?><?cs
+ /def ?>
+
+This bug was filed as bug #7418 on trac.edgewall.org.
+
+
66 TODO
@@ -0,0 +1,66 @@
+==========
+ TODO
+==========
+
+Some various ideas for improving tracstats (in no particular order):
+
+* Select by author, path, file extension, etc.
+* Most edited files, directories, projects, etc.
+* Active users by revisions, by changes, by frequency, etc.
+* Commits - total, first, last, average-per-day, etc.
+* Graphs by day-of-week, by hour-of-day, etc.
+* Percent of codebase modified
+* Percent of paths modified
+* Lines of code changed - average, top 10, etc.
+* Ticket duration (open to close) -- worst, best, average, etc.
+* Ticket response time (open to first response) -- same...
+
+Perhaps we should separate into sections:
+
+* Project Summary
+* Developer Leaderboard
+* Developer Profile
+* Codebase Statistics
+* Wiki Statistics
+* Tickets Statistics
+* Recent Activity
+
+Main page::
+
+ Total # of authors
+ Total revisions
+ Total pages
+ Total tickets
+
+ [X] Code [X] Wiki [X] Tickets
+
+ [ Code Changes ] [ Wiki Changes ] [Ticket Changes ]
+
+ Latest commits
+ #120234 "Something is changed..." committed "2 hours ago" by "username"
+
+ Latest wiki changes
+ "WikiPage" changed "4 hours ago" by "username"
+
+ Latest tickets reported
+ #34234 "Something is broken" reported "14 hours ago" by "username"
+
+Tickets::
+
+ Open
+ Critical
+ New
+ Unassigned
+ All bugs ever reported
+
+Detect languages used (perhaps just file extensions)::
+
+ Languages: Python, C, Assembly
+
+Performance::
+
+ time sqlite3 trac.db "select rev, path, change_type, author from node_change join revision using (rev)" > ~/foo
+ time sqlite3 trac.db "select rev, path, change_type from node_change" > ~/foo
+ time sqlite3 trac.db "select rev, path, change_type from node_change left join revision rev using (rev)" > ~/foo
+ time sqlite3 trac.db "select rev, path, change_type from node_change" > ~/foo
+
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+from setuptools import setup, find_packages
+
+PACKAGE = 'TracStats'
+VERSION = '0.1'
+
+setup(
+ name=PACKAGE, version=VERSION,
+ description="A plugin for project statistics",
+ packages=find_packages(exclude=['ez_setup', '*.tests*']),
+ package_data={
+ 'tracstats': [
+ 'htdocs/*.css',
+ 'htdocs/*.png',
+ 'htdocs/*.gif',
+ 'htdocs/*.js',
+ 'templates/*.cs'
+ ]
+ },
+ entry_points = {
+ 'trac.plugins': [
+ 'tracstats.web_ui = tracstats.web_ui',
+ ]
+ }
+)
+
No changes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,69 @@
+
+li {
+ padding: 2px;
+}
+
+
+table.changetypes .edit, .legend .edit { background: #fd8 }
+table.changetypes .delete, .legend .delete { background: #f88 }
+table.changetypes .add, .legend .add { background: #bfb }
+table.changetypes .copy, .legend .copy { background: #88f }
+table.changetypes .move, .legend .move { background: #ccc }
+table.changetypes .unknown, .legend .unknown { background: #fff }
+
+table.changetypes td {
+ padding: 1px 2px;
+ margin: 2px 2px 2px 0;
+}
+
+/* Legend for diff and file colors */
+.legend {
+ font-size: 9px;
+ line-height: 1em;
+ padding: .5em 0;
+}
+.legend h3 { display: none; }
+.legend dt {
+ background: #fff;
+ border: 1px solid #999;
+ float: left;
+ margin: .1em .5em .1em 0;
+ overflow: hidden;
+ width: .8em; height: .8em;
+}
+.legend dl {
+ display: inline;
+ padding: 0;
+ margin: 0;
+ margin-right: .5em;
+}
+.legend dd {
+ display: inline;
+ float: left;
+ padding: 0;
+ margin: 0;
+ margin-right: 2em;
+}
+
+/* tables */
+table.tablesorter thead tr th, table.tablesorter tfoot tr th {
+ border-bottom: 1px solid lightgray;
+ font-size: 8pt;
+ padding: 2px;
+}
+table.tablesorter thead tr .header {
+ background-repeat: no-repeat;
+ background-position: center right;
+ cursor: pointer;
+}
+table.tablesorter thead tr .headerSortUp {
+ background-image: url(asc.gif);
+}
+table.tablesorter thead tr .headerSortDown {
+ background-image: url(desc.gif);
+}
+
+table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
+ font-weight: bold;
+}
+
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit db2a89c

Please sign in to comment.