Hi Stephen & David,

So, I've done a couple of queries on the netdev patchset that I think
might be useful for you:

First, a breakdown by current state:

       state       | count
-------------------+-------
 Not Applicable    |  7588
 Changes Requested |  6364
 Awaiting Upstream |   705
 Under Review      |     3
 New               |     3
 Accepted          | 21653
 Deferred          |   386
 Superseded        |  2661
 Rejected          |  1679
 RFC               |  4106
(10 rows)

Second, a breakdown of current state vs. patch size. The columns are:

 * the patch size, given as the log (base-2) of the length of the
   patch's content.

 * the state id and name

 * the number of patches with that fit into the (state, size) category

 * the total number of patches with the same log(2, size).

For example, the first row tells us that there are 5742 patches that are
have a size in the range [2^8, 2^9) bytes, and 2 of those patches are in
the 'New' state.

 log_size | state |       name        |  n   | total_n
----------+-------+-------------------+------+---------
        8 |     1 | New               |    2 |    5742
       11 |     1 | New               |    1 |    7824
        8 |     2 | Under Review      |    2 |    5742
        9 |     2 | Under Review      |    1 |    9474
        7 |     3 | Accepted          |   14 |      29
        8 |     3 | Accepted          | 3210 |    5742
        9 |     3 | Accepted          | 5211 |    9474
       10 |     3 | Accepted          | 4469 |    8725
       11 |     3 | Accepted          | 3542 |    7824
       12 |     3 | Accepted          | 2546 |    6053
       13 |     3 | Accepted          | 1294 |    3502
       14 |     3 | Accepted          |  662 |    1928
       15 |     3 | Accepted          |  290 |     961
       16 |     3 | Accepted          |  108 |     398
       17 |     3 | Accepted          |   51 |     170
       18 |     3 | Accepted          |    4 |      23
        7 |     4 | Rejected          |    3 |      29
        8 |     4 | Rejected          |  252 |    5742
        9 |     4 | Rejected          |  409 |    9474
       10 |     4 | Rejected          |  351 |    8725
       11 |     4 | Rejected          |  281 |    7824
       12 |     4 | Rejected          |  180 |    6053
       13 |     4 | Rejected          |   97 |    3502
       14 |     4 | Rejected          |   48 |    1928
       15 |     4 | Rejected          |   31 |     961
       16 |     4 | Rejected          |   14 |     398
       17 |     4 | Rejected          |    8 |     170
       18 |     4 | Rejected          |    3 |      23
        8 |     5 | RFC               |  399 |    5742
        9 |     5 | RFC               |  656 |    9474
       10 |     5 | RFC               |  730 |    8725
       11 |     5 | RFC               |  775 |    7824
       12 |     5 | RFC               |  680 |    6053
       13 |     5 | RFC               |  451 |    3502
       14 |     5 | RFC               |  267 |    1928
       15 |     5 | RFC               |   97 |     961
       16 |     5 | RFC               |   39 |     398
       17 |     5 | RFC               |   12 |     170
        6 |     6 | Not Applicable    |    1 |       1
        7 |     6 | Not Applicable    |   10 |      29
        8 |     6 | Not Applicable    |  932 |    5742
        9 |     6 | Not Applicable    | 1383 |    9474
       10 |     6 | Not Applicable    | 1392 |    8725
       11 |     6 | Not Applicable    | 1321 |    7824
       12 |     6 | Not Applicable    | 1107 |    6053
       13 |     6 | Not Applicable    |  691 |    3502
       14 |     6 | Not Applicable    |  412 |    1928
       15 |     6 | Not Applicable    |  199 |     961
       16 |     6 | Not Applicable    |   75 |     398
       17 |     6 | Not Applicable    |   32 |     170
       18 |     6 | Not Applicable    |    3 |      23
        7 |     7 | Changes Requested |    2 |      29
        8 |     7 | Changes Requested |  555 |    5742
        9 |     7 | Changes Requested | 1067 |    9474
       10 |     7 | Changes Requested | 1078 |    8725
       11 |     7 | Changes Requested | 1193 |    7824
       12 |     7 | Changes Requested |  985 |    6053
       13 |     7 | Changes Requested |  611 |    3502
       14 |     7 | Changes Requested |  379 |    1928
       15 |     7 | Changes Requested |  265 |     961
       16 |     7 | Changes Requested |  132 |     398
       17 |     7 | Changes Requested |   58 |     170
       18 |     7 | Changes Requested |   12 |      23
        8 |     8 | Awaiting Upstream |   72 |    5742
        9 |     8 | Awaiting Upstream |  130 |    9474
       10 |     8 | Awaiting Upstream |  142 |    8725
       11 |     8 | Awaiting Upstream |  125 |    7824
       12 |     8 | Awaiting Upstream |  111 |    6053
       13 |     8 | Awaiting Upstream |   68 |    3502
       14 |     8 | Awaiting Upstream |   35 |    1928
       15 |     8 | Awaiting Upstream |   16 |     961
       16 |     8 | Awaiting Upstream |    3 |     398
       17 |     8 | Awaiting Upstream |    1 |     170
        8 |     9 | Superseded        |  301 |    5742
        9 |     9 | Superseded        |  541 |    9474
       10 |     9 | Superseded        |  484 |    8725
       11 |     9 | Superseded        |  498 |    7824
       12 |     9 | Superseded        |  378 |    6053
       13 |     9 | Superseded        |  254 |    3502
       14 |     9 | Superseded        |  114 |    1928
       15 |     9 | Superseded        |   59 |     961
       16 |     9 | Superseded        |   20 |     398
       17 |     9 | Superseded        |    6 |     170
       18 |     9 | Superseded        |    1 |      23
        8 |    10 | Deferred          |   17 |    5742
        9 |    10 | Deferred          |   76 |    9474
       10 |    10 | Deferred          |   79 |    8725
       11 |    10 | Deferred          |   88 |    7824
       12 |    10 | Deferred          |   66 |    6053
       13 |    10 | Deferred          |   36 |    3502
       14 |    10 | Deferred          |   11 |    1928
       15 |    10 | Deferred          |    4 |     961
       16 |    10 | Deferred          |    7 |     398
       17 |    10 | Deferred          |    2 |     170
(94 rows)

I've also attached the SQL used to generate these data, which you may
want to review before using it for anything serious. Also, let me know
if you'd like these queries re-done with different parameters (is the
log-2 suitable?), the output in a different format, or some other
analysis of the patchset.

Like I said, there's no historical log for the updates to a patch, but
it's sounding like that would be a good feature for me to add.

Cheers,


Jeremy
SELECT patchwork_state.name AS state, count(*)
	FROM patchwork_patch
	INNER JOIN patchwork_state
		ON patchwork_state.id = patchwork_patch.state_id
	WHERE patchwork_patch.project_id =
		(SELECT id FROM patchwork_project where linkname = 'netdev')
	GROUP BY state;

/* query plan:
 *  - create a set of (count, log(2, size)) tuples from the patches for netdev
 *  - cross with all of the possible states
 *  - count all of the patches with the same (state, log_size)
 */

SELECT q.log_size, q.state, patchwork_state.name, count(*) AS n, q.total_n
	FROM patchwork_patch, patchwork_state, (
		SELECT t.*, s.id AS state
			FROM (SELECT count(*) AS total_n,
				patchwork_patch.project_id AS project,
				floor(log(2, length(patchwork_patch.content))) AS log_size
				FROM patchwork_patch
				WHERE patchwork_patch.project_id =
					(SELECT id FROM patchwork_project
						WHERE linkname = 'netdev')
					AND patchwork_patch.content IS NOT NULL
				GROUP BY log_size, project) t,
				patchwork_state s) q
	WHERE floor(log(2, length(patchwork_patch.content))) = q.log_size
		AND patchwork_patch.state_id = q.state
		AND patchwork_patch.project_id = q.project
		AND patchwork_state.id = q.state
	GROUP BY q.state, q.total_n, q.log_size, patchwork_state.name
	ORDER BY q.state, q.log_size;
_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to