Skip to content

Instantly share code, notes, and snippets.

@greggles
Created May 19, 2014 13:40
Show Gist options
  • Save greggles/ca5f6e8a594e63cdb0bb to your computer and use it in GitHub Desktop.
Save greggles/ca5f6e8a594e63cdb0bb to your computer and use it in GitHub Desktop.
sdostats
drush -r /var/www/security.drupal.org/htdocs sqlq "select 'unassigned issues: ', count(1) from project_issues p INNER JOIN project_issue_state pis ON p.sid = pis.sid where assigned = 0 and pis.default_query = 1;"
drush -r /var/www/security.drupal.org/htdocs sqlq "select 'issues younger than a year: ', count(1) from project_issues p INNER JOIN project_issue_state pis ON p.sid = pis.sid INNER JOIN node n on p.nid = n.nid where pis.default_query = 1 and n.created > unix_timestamp() - 60*60*24*365;"
drush -r /var/www/security.drupal.org/htdocs sqlq "SELECT 'average cycle time: ', SUM(CASE pis.default_query WHEN 1 THEN unix_timestamp() WHEN 0 THEN n.changed END - n.created) / (COUNT(1) * 60*60*24) AS duration2 FROM project_issues p INNER JOIN node n ON n.nid = p.nid INNER JOIN project_issue_state pis ON p.sid = pis.sid WHERE n.status = 1 AND p.sid > 1 AND p.pid NOT IN (77, 738) ORDER BY n.created desc;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment