Fossil

Changes On Branch piechart
Login

Changes On Branch piechart

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch piechart Excluding Merge-Ins

This is equivalent to a diff from 10e3d65707 to 1ab29c8299

2015-05-12
13:19
Permit --notfound and --repolist to be used together on "fossil server". Merge changes to always show a piechart for "By User" reports. Fix an uninitialized variable in "fossil rebuild". ... (check-in: 434f7e17d9 user: drh tags: trunk)
2015-05-11
13:50
If SQLite < 3.8.10, don't bother to provide a link to the /repo-tabsize web-page: it wouldn't provide any usefull result anyway. ... (check-in: f3d8588e6f user: jan.nijtmans tags: trunk)
01:35
Fix an uninitialized variable in the "fossil rebuild" command when using the --compress-only option. ... (Closed-Leaf check-in: 1ab29c8299 user: drh tags: piechart)
01:31
Merge in the --compress-only option for "fossil rebuild" ... (check-in: 9fdfaf0f68 user: drh tags: piechart)
01:31
Add the --compress-only option to the "fossil rebuild" command. ... (check-in: 10e3d65707 user: drh tags: trunk)
2015-05-10
17:35
Avoid duplicate entries in the output of "fossil finfo". ... (check-in: 26c283467a user: drh tags: trunk)

Changes to src/rebuild.c.
541
542
543
544
545
546
547
548

549
550
551
552
553
554
555
541
542
543
544
545
546
547

548
549
550
551
552
553
554
555







-
+







**   --wal             Set Write-Ahead-Log journalling mode on the database
**
** See also: deconstruct, reconstruct
*/
void rebuild_database(void){
  int forceFlag;
  int randomizeFlag;
  int errCnt;
  int errCnt = 0;
  int omitVerify;
  int doClustering;
  const char *zPagesize;
  int newPagesize = 0;
  int activateWal;
  int runVacuum;
  int runDeanalyze;
Changes to src/statrep.c.
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419









420
421
422
423
424
425
426
427
404
405
406
407
408
409
410









411
412
413
414
415
416
417
418
419

420
421
422
423
424
425
426







-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-







                                        row colors */
  int nMaxEvents = 1;                /* max number of events for
                                        all rows. */
  stats_report_init_view();
  stats_report_event_types_menu("byuser", NULL);
  @ <h1>Timeline Events
  @ (%s(stats_report_label_for_type())) by User</h1>
  if( PB("pie") ){
    db_multi_exec(
      "CREATE TEMP TABLE piechart(amt,label);"
      "INSERT INTO piechart SELECT count(*), user FROM v_reports"
                           " GROUP BY user ORDER BY count(*) DESC;"
    );
    @ <svg width=800 height=600>
    piechart_render(800, 600, PIE_OTHER);
    @ </svg>
  db_multi_exec(
    "CREATE TEMP TABLE piechart(amt,label);"
    "INSERT INTO piechart SELECT count(*), user FROM v_reports"
                         " GROUP BY user ORDER BY count(*) DESC;"
  );
  if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
    @ <center><svg width=700 height=400>
    piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
    @ </svg></centre><hr/>
    return;
  }
  @ <table class='statistics-report-table-events' border='0'
  @ cellpadding='2' cellspacing='0' id='statsTable'>
  @ <thead><tr>
  @ <th>User</th>
  @ <th>Events</th>
  @ <th width='90%%'><!-- relative commits graph --></th>
477
478
479
480
481
482
483
484

485
486
487
488
489
490
491
476
477
478
479
480
481
482

483
484
485
486
487
488
489
490







-
+








  db_multi_exec(
    "CREATE TEMP TABLE statrep(filename, cnt);"
    "INSERT INTO statrep(filename, cnt)"
    "  SELECT filename.name, count(distinct mlink.mid)"
    "    FROM filename, mlink"
    "   WHERE filename.fnid=mlink.fnid"
    "   GROUP BY 1"
    "   GROUP BY 1;"
  );
  db_prepare(&query,
    "SELECT filename, cnt FROM statrep ORDER BY cnt DESC, filename /*sort*/"
  );
  mxEvent = db_int(1, "SELECT max(cnt) FROM statrep");
  @ <h1>Check-ins Per File</h1>
  @ <table class='statistics-report-table-events' border='0'
537
538
539
540
541
542
543













544
545
546
547
548
549
550
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562







+
+
+
+
+
+
+
+
+
+
+
+
+







  db_prepare(&query,
               "SELECT cast(mtime %% 7 AS INTEGER) dow, "
               "COUNT(*) AS eventCount "
               "FROM v_reports "
               "GROUP BY dow ORDER BY dow");
  @ <h1>Timeline Events
  @ (%s(stats_report_label_for_type())) by Day of the Week</h1>
  db_multi_exec(
    "CREATE TEMP TABLE piechart(amt,label);"
    "INSERT INTO piechart SELECT count(*), cast(mtime %% 7 AS INT) FROM v_reports"
                         " GROUP BY 2 ORDER BY 2;"
    "UPDATE piechart SET label = CASE label WHEN 0 THEN 'Monday' WHEN 1 THEN 'Tuesday'"
    "  WHEN 2 THEN 'Wednesday' WHEN 3 THEN 'Thursday' WHEN 4 THEN 'Friday'"
    "  WHEN 5 THEN 'Saturday' ELSE 'Sunday' END;"
  );
  if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
    @ <center><svg width=700 height=400>
    piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
    @ </svg></centre><hr/>
  }
  @ <table class='statistics-report-table-events' border='0'
  @ cellpadding='2' cellspacing='0' id='statsTable'>
  @ <thead><tr>
  @ <th>DoW</th>
  @ <th>Day</th>
  @ <th>Events</th>
  @ <th width='90%%'><!-- relative commits graph --></th>