Fossil SCM
Add links to /bigbloblist from the /artifact_stats page.
Commit
9fc519408944c3ee73b23270398181b76d654e73535c545339216584c6e1b4d1
Parent
cefadbd5ce4dba5…
1 file changed
+27
-10
+27
-10
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -637,10 +637,22 @@ | ||
| 637 | 637 | db_multi_exec("%s", zSql/*safe-for-%s*/); |
| 638 | 638 | if( bWithTypes ){ |
| 639 | 639 | db_multi_exec("%s", zSql2/*safe-for-%s*/); |
| 640 | 640 | } |
| 641 | 641 | } |
| 642 | + | |
| 643 | +/* | |
| 644 | +** Output text "the largest N artifacts". Make this text a hyperlink | |
| 645 | +** to bigbloblist if N is not too big. | |
| 646 | +*/ | |
| 647 | +static void largest_n_artifacts(int N){ | |
| 648 | + if( N>250 ){ | |
| 649 | + @ (the largest %d(N) artifacts) | |
| 650 | + }else{ | |
| 651 | + @ (the <a href='%R/bigbloblist?n=%d(N)'>largest %d(N) artifacts</a>) | |
| 652 | + } | |
| 653 | +} | |
| 642 | 654 | |
| 643 | 655 | /* |
| 644 | 656 | ** WEBPAGE: artifact_stats |
| 645 | 657 | ** |
| 646 | 658 | ** Show information about the sizes of artifacts in this repository |
| @@ -760,20 +772,25 @@ | ||
| 760 | 772 | @ <tr><th>Median full-text artifact:</th><td>%d(med)</td></tr> |
| 761 | 773 | @ </table> |
| 762 | 774 | |
| 763 | 775 | @ <h1>Artifact size distribution facts:</h1> |
| 764 | 776 | @ <ol> |
| 765 | - @ <li><p>The largest 1%% of artifacts (the largest %d((nTotal+99)/100) \ | |
| 766 | - @ artifacts) use %lld(sz1pct*100/sumCmpr)%% of the total artifact space. | |
| 767 | - @ <li><p>The largest 10%% of artifacts (the largest %d((nTotal+9)/10) \ | |
| 768 | - @ artifacts) use %lld(sz10pct*100/sumCmpr)%% of the total artifact space. | |
| 769 | - @ <li><p>The largest 25%% of artifacts (the largest %d(nTotal/4) \ | |
| 770 | - @ artifacts) use %lld(sz25pct*100/sumCmpr)%% of the total artifact space. | |
| 771 | - @ <li><p>The largest 50%% of artifacts (the largest %d(nTotal/2) \ | |
| 772 | - @ artifacts) use %lld(sz50pct*100/sumCmpr)%% of the total artifact space. | |
| 773 | - @ <li><p>Half of the total artifact space is used by the %d(n50pct) \ | |
| 774 | - @ (%.1f(n50pct*100.0/nTotal)%%) largest artifacts. | |
| 777 | + @ <li><p>The largest %.2f(n50pct*100.0/nTotal)%% of artifacts | |
| 778 | + largest_n_artifacts(n50pct); | |
| 779 | + @ use 50%% of the total artifact space. | |
| 780 | + @ <li><p>The largest 1%% of artifacts | |
| 781 | + largest_n_artifacts((nTotal+99)/100); | |
| 782 | + @ use %lld(sz1pct*100/sumCmpr)%% of the total artifact space. | |
| 783 | + @ <li><p>The largest 10%% of artifacts | |
| 784 | + largest_n_artifacts((nTotal+9)/10); | |
| 785 | + @ use %lld(sz10pct*100/sumCmpr)%% of the total artifact space. | |
| 786 | + @ <li><p>The largest 25%% of artifacts | |
| 787 | + largest_n_artifacts((nTotal+4)/5); | |
| 788 | + @ use %lld(sz25pct*100/sumCmpr)%% of the total artifact space. | |
| 789 | + @ <li><p>The largest 50%% of artifacts | |
| 790 | + largest_n_artifacts((nTotal+1)/2); | |
| 791 | + @ use %lld(sz50pct*100/sumCmpr)%% of the total artifact space. | |
| 775 | 792 | @ </ol> |
| 776 | 793 | |
| 777 | 794 | @ <h1>Artifact Sizes By Type:</h1> |
| 778 | 795 | db_prepare(&q, |
| 779 | 796 | "SELECT atype, count(*), sum(isDelta), sum(szCmpr), sum(szExp)" |
| 780 | 797 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -637,10 +637,22 @@ | |
| 637 | db_multi_exec("%s", zSql/*safe-for-%s*/); |
| 638 | if( bWithTypes ){ |
| 639 | db_multi_exec("%s", zSql2/*safe-for-%s*/); |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | /* |
| 644 | ** WEBPAGE: artifact_stats |
| 645 | ** |
| 646 | ** Show information about the sizes of artifacts in this repository |
| @@ -760,20 +772,25 @@ | |
| 760 | @ <tr><th>Median full-text artifact:</th><td>%d(med)</td></tr> |
| 761 | @ </table> |
| 762 | |
| 763 | @ <h1>Artifact size distribution facts:</h1> |
| 764 | @ <ol> |
| 765 | @ <li><p>The largest 1%% of artifacts (the largest %d((nTotal+99)/100) \ |
| 766 | @ artifacts) use %lld(sz1pct*100/sumCmpr)%% of the total artifact space. |
| 767 | @ <li><p>The largest 10%% of artifacts (the largest %d((nTotal+9)/10) \ |
| 768 | @ artifacts) use %lld(sz10pct*100/sumCmpr)%% of the total artifact space. |
| 769 | @ <li><p>The largest 25%% of artifacts (the largest %d(nTotal/4) \ |
| 770 | @ artifacts) use %lld(sz25pct*100/sumCmpr)%% of the total artifact space. |
| 771 | @ <li><p>The largest 50%% of artifacts (the largest %d(nTotal/2) \ |
| 772 | @ artifacts) use %lld(sz50pct*100/sumCmpr)%% of the total artifact space. |
| 773 | @ <li><p>Half of the total artifact space is used by the %d(n50pct) \ |
| 774 | @ (%.1f(n50pct*100.0/nTotal)%%) largest artifacts. |
| 775 | @ </ol> |
| 776 | |
| 777 | @ <h1>Artifact Sizes By Type:</h1> |
| 778 | db_prepare(&q, |
| 779 | "SELECT atype, count(*), sum(isDelta), sum(szCmpr), sum(szExp)" |
| 780 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -637,10 +637,22 @@ | |
| 637 | db_multi_exec("%s", zSql/*safe-for-%s*/); |
| 638 | if( bWithTypes ){ |
| 639 | db_multi_exec("%s", zSql2/*safe-for-%s*/); |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | /* |
| 644 | ** Output text "the largest N artifacts". Make this text a hyperlink |
| 645 | ** to bigbloblist if N is not too big. |
| 646 | */ |
| 647 | static void largest_n_artifacts(int N){ |
| 648 | if( N>250 ){ |
| 649 | @ (the largest %d(N) artifacts) |
| 650 | }else{ |
| 651 | @ (the <a href='%R/bigbloblist?n=%d(N)'>largest %d(N) artifacts</a>) |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | /* |
| 656 | ** WEBPAGE: artifact_stats |
| 657 | ** |
| 658 | ** Show information about the sizes of artifacts in this repository |
| @@ -760,20 +772,25 @@ | |
| 772 | @ <tr><th>Median full-text artifact:</th><td>%d(med)</td></tr> |
| 773 | @ </table> |
| 774 | |
| 775 | @ <h1>Artifact size distribution facts:</h1> |
| 776 | @ <ol> |
| 777 | @ <li><p>The largest %.2f(n50pct*100.0/nTotal)%% of artifacts |
| 778 | largest_n_artifacts(n50pct); |
| 779 | @ use 50%% of the total artifact space. |
| 780 | @ <li><p>The largest 1%% of artifacts |
| 781 | largest_n_artifacts((nTotal+99)/100); |
| 782 | @ use %lld(sz1pct*100/sumCmpr)%% of the total artifact space. |
| 783 | @ <li><p>The largest 10%% of artifacts |
| 784 | largest_n_artifacts((nTotal+9)/10); |
| 785 | @ use %lld(sz10pct*100/sumCmpr)%% of the total artifact space. |
| 786 | @ <li><p>The largest 25%% of artifacts |
| 787 | largest_n_artifacts((nTotal+4)/5); |
| 788 | @ use %lld(sz25pct*100/sumCmpr)%% of the total artifact space. |
| 789 | @ <li><p>The largest 50%% of artifacts |
| 790 | largest_n_artifacts((nTotal+1)/2); |
| 791 | @ use %lld(sz50pct*100/sumCmpr)%% of the total artifact space. |
| 792 | @ </ol> |
| 793 | |
| 794 | @ <h1>Artifact Sizes By Type:</h1> |
| 795 | db_prepare(&q, |
| 796 | "SELECT atype, count(*), sum(isDelta), sum(szCmpr), sum(szExp)" |
| 797 |