pjcj / Devel--Cover

Code coverage metrics for Perl
http://www.pjcj.net/perl.html
93 stars 89 forks source link

Top level HTML for cpancover needs reworking. #102

Open pjcj opened 10 years ago

pjcj commented 10 years ago

There are now over 25,000 CPAN modules for which coverage is available. Sticking them all in one table on the front page of http://cpancover.com has not scaled ;-) Something needs to change.

The table could be broken into separate pages. This could be by author (P/PJ/PJCJ etc) or by module name (G/Gedcom etc). I'm not particularly happy with either of those, but implementing one or both would be better than what we have now. Perhaps there are better solutions?

At the moment, all of cpancover.com is static. This brings many advantages, and also disadvantages. I am not averse to adding a dynamic component, or even making the whole thing dynamic, but we need to ensure that performance is reasonable.

We should also consider metacpan integration, which may take some of the pressure off having a cpancover interface which supports searching, for example.

The code starts somewhere around https://github.com/pjcj/Devel--Cover/blob/master/lib/Devel/Cover/Collection.pm#L286

tobyink commented 10 years ago

By author would be great. It would quickly let me see which of my releases have the worst coverage and need improvement.

wchristian commented 10 years ago

I probably won't have the time to implement this, but here's a sketch of a UI design that would probably work decently well:

Stuff all of the data you have right now into a JSON array containing hashes for each dist. Have a search field people can type into, for example something like "Catal", then have an onChange event that searches through the JSON array and gives all entries where the dist name, module name, or uploader name match /._C._a._t._a.l./i and then render those as HTML.

Include a button for "render everything".

Maybe include additional number fields to filter out and display dists that have total/stmt/branch/... values above or below a certain value.

Maybe also include a button for "show all dists with N/A".

If it turns out that any of these options still result in excessive rendering times, do the filtering and gathering of the result, and display something like "20 hits in 30000 dists, click here to render" and have it render immediately if the hit count is below a certain number.

wchristian commented 10 years ago
(@Tux_) Mithaldu, having a top-level (static) JSON would be nice to download and do statistics on :P
(@pjcj) Tux_, Mithaldu: something more than http://cpancover.com/latest/cpancover.json, or had you not seen that?
(@Tux_) exactly that.
(@Tux_) include the author pls
(@pjcj) yeah, I have an open bug for author
(@Mithaldu) one obvious thing i see missing is a single flag noting that a dist has no coverage data whatsoever
(@Mithaldu) and if possible a field for the main module it provides
(@Mithaldu) so people who search::with::colons get results
(@Tux_) yes, including the dist would be a requirement too
(@Mithaldu) i'm also a little confused as to why there's total in coverage and total in total :)
(@pjcj) the idea is that is it a subset of a number of more detailed files such as http://cpancover.com/latest/cpancover.json
(@pjcj) er, such as http://cpancover.com/latest/Text-CSV-Field-1.01/cover.json
(@Mithaldu) feels like each one should have an entry with a link to the full version
(@pjcj) yeah, could do
jkeenan commented 10 years ago

Since http://cpantesters.org/ covers much the same territory as cpancover.com, couldn't we borrow some of their approach to search via Distribution vs. search via Author?

jsoref commented 3 months ago

Today, the top level page has distributions by first character, and for each character all items are listed for each version.

Ignoring the author thing, which sounds interesting, I'd like to propose changing the per character pages to show the first word only (treating - as a word break).

Today Module | Version | Log | stmt | bran | cond | sub | pod | total -- | -- | -- | -- | -- | -- | -- | -- | -- AAAA-Crypt-DH | 0.04 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 AAAA-Crypt-DH | 0.06 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 AAAA-Mail-SpamAssassin | 0.002 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 AAAAAAAAA | 1.01 | ¶ | 76.12 | 35.00 | 33.33 | 92.31 | 0.00 | 66.98 AAC-Pvoice | 0.91 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ABI | 1.0 | ¶ | 90.88 | 83.33 | 33.33 | 96.43 | 91.67 | 89.08 ABNF-Grammar | 0.08 | ¶ | 86.06 | 47.84 | 39.46 | 93.48 | n/a | 71.82 ACH-Builder | 0.23 | ¶ | 8.45 | 0.00 | 0.00 | 14.63 | 93.55 | 13.49 ACL-Lite | 0.0004 | ¶ | 98.04 | 81.82 | 40.00 | 100.00 | 100.00 | 90.80 ACL-Regex | 0.0001_02 | ¶ | 8.33 | 0.00 | n/a | 25.00 | 83.33 | 11.02 ACL-Regex | 0.0002 | ¶ | 8.33 | 0.00 | n/a | 25.00 | 83.33 | 11.02 ACME-AsciiEmoji | 0.01 | ¶ | 12.33 | n/a | n/a | 4.76 | 96.67 | 35.71 ACME-CPANPLUS-Module-With-Core-PreReq | 0.04 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-CPANPLUS-Module-With-Core-PreReq | 0.06 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-Dzil-Test-daemon | 0.001 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-Dzil-Test-daemon2 | 0.001 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-Error | 0.03 | ¶ | 33.33 | 8.33 | n/a | 66.67 | n/a | 31.37 ACME-Error-31337 | 0.01 | ¶ | 92.31 | n/a | n/a | 80.00 | n/a | 88.89 ACME-Error-Coy | 0.01 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 ACME-Error-HTML | 0.01 | ¶ | 92.31 | n/a | n/a | 80.00 | n/a | 88.89 ACME-Error-IgpayAtinlay | 0.01 | ¶ | 85.71 | n/a | n/a | 80.00 | n/a | 84.21 ACME-Error-Translate | 0.01 | ¶ | 83.33 | n/a | n/a | 100.00 | n/a | 87.50 ACME-Frobozz | 0.01 | ¶ | 100.00 | n/a | n/a | 60.00 | 100.00 | 86.67 ACME-FunkyDocs | 0.002 | ¶ | 87.18 | 35.71 | 33.33 | 100.00 | n/a | 74.60 ACME-MBHall | 0.02_02 | ¶ | 100.00 | n/a | n/a | 60.00 | 100.00 | 86.67 ACME-MBHall | 0.03 | ¶ | 92.86 | n/a | n/a | 80.00 | 100.00 | 90.48 ACME-MSDN-SPUtility | 0.04 | ¶ | 34.62 | n/a | 0.00 | 42.86 | 100.00 | 40.00 ACME-MyFirstModule-SETHS | 0.01 | ¶ | 81.82 | n/a | n/a | 60.00 | 100.00 | 77.78 ACME-MyFirstModule-SETHS | 0.02 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 ACME-MyFirstModule-SETHS | 0.03 | ¶ | 81.82 | n/a | n/a | 60.00 | 100.00 | 77.78 ACME-PM-Voronezh | 0.02 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 ACME-QuoteDB | 0.1.2 | ¶ | 90.60 | 64.17 | 63.27 | 96.33 | 100.00 | 83.45 ACME-SocketTest | 0.001 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-SocketTest | 0.002 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-THEDANIEL-Utils | 0.01 | ¶ | 100.00 | 100.00 | n/a | 100.00 | 100.00 | 100.00 ACME-Test-Foo | 1.7 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-YAPC-NA-2012 | 0.02 | ¶ | n/a | n/a | n/a | n/a | n/a | n/a ACME-YAPC-NA-2012 | 0.02_03 | ¶ | 76.47 | n/a | n/a | 80.00 | 100.00 | 79.17 ACME-ltharris | 0.03 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 ACME-ltharris | 0.03_01 | ¶ | 100.00 | n/a | n/a | 100.00 | n/a | 100.00 ADAMK-Release ...
Proposed Top Level Module Name | Modules -- | -- AAAA | 2 AAAAAAAAA | 1 AAC | 1 ABI | 1 ABNF | 1 ACH | 1 ACL | 2 ACME | 22 ADAMK | ... ...

I'm not quite sure the value of showing coverage for lots of versions, so I'd be inclined so have the page that actually lists modules only show the "newest" version and have it link to a page that has the other versions.

pjcj commented 3 months ago

Now that coverage is displayed on metacpan this ticket is less important and has a lower priority, but it would still be nice to make improvements. Thanks for your proposal.