~pbxt-core/pbxt/2.0

« back to all changes in this revision

Viewing changes to src/strutil_xt.cc

  • Committer: Paul McCullagh
  • Date: 2010-12-10 13:16:17 UTC
  • mfrom: (831.2.94 1.5-trunk)
  • Revision ID: paul.mccullagh@primebase.org-20101210131617-dkfn4z6jz7otxq1z
Merged with 1.5 trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
475
475
 * --------------- SYSTEM STATISTICS ------------------
476
476
 */
477
477
 
478
 
static char                                     su_t_unit[10] = "usec";
 
478
static char                                     su_time_unit[10] = "usec";
 
479
static char                                     *su_time_ms = "msec";
 
480
static char                                     su_read_time_unit[10] = "rd.us";
 
481
static char                                     su_write_time_unit[10] = "wr.us";
 
482
static char                                     su_sync_time_unit[10] = "sy.us";
 
483
static char                                     *su_read_time_ms = "rd.ms";
 
484
static char                                     *su_write_time_ms = "wr.ms";
 
485
static char                                     *su_sync_time_ms = "sy.ms";
 
486
 
479
487
/*
480
488
 * Note times, are return in microseconds, but the display in xtstat is currently
481
489
 * in milliseconds.
483
491
static XTStatMetaDataRec        pbxt_stat_meta_data[XT_STAT_MAXIMUM] = {
484
492
        { XT_STAT_TIME_CURRENT, "Current Time",                         "time", "curr",         XT_STAT_DATE,
485
493
                "The current time in seconds" },
486
 
        { XT_STAT_TIME_PASSED,  "Time Since Last Call",         "time", su_t_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
494
        { XT_STAT_TIME_PASSED,  "Time Since Last Call",         "time", su_time_unit,   XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
487
495
                "Time passed in %sseconds since last statistics call" },
488
496
 
489
497
        { XT_STAT_COMMITS,                      "Commit Count",                 "xact", "commt",        XT_STAT_ACCUMULATIVE,
490
498
                "Number of transactions committed" },
491
499
        { XT_STAT_ROLLBACKS,            "Rollback Count",               "xact", "rollb",        XT_STAT_ACCUMULATIVE,
492
500
                "Number of transactions rolled back" },
493
 
        { XT_STAT_WAIT_FOR_XACT,        "Wait for Xact Count",  "xact", "waits",        XT_STAT_ACCUMULATIVE,
 
501
        { XT_STAT_WAIT_FOR_XACT,        "Wait for Trx Count",   "xact", "waits",        XT_STAT_ACCUMULATIVE,
494
502
                "Number of times waited for another transaction" },
495
 
        { XT_STAT_XACT_TO_CLEAN,        "Dirty Xact Count",             "xact", "dirty",        0,
 
503
        { XT_STAT_XACT_TO_CLEAN,        "Dirty Trx Count",              "xact", "dirty",        0,
496
504
                "Number of transactions still to be cleaned up" },
497
505
 
498
506
        { XT_STAT_STAT_READS,           "Read Statements",              "stat", "read",         XT_STAT_ACCUMULATIVE,
501
509
                "Number of UPDATE/INSERT/DELETE statements" },
502
510
 
503
511
        { XT_STAT_REC_BYTES_IN,         "Record Bytes Read",    "rec", "in",            XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
504
 
                "Bytes read from the record/row files" },
 
512
                "Bytes read from the record and row files" },
505
513
        { XT_STAT_REC_BYTES_OUT,        "Record Bytes Written", "rec", "out",           XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
506
 
                "Bytes written from the record/row files" },
507
 
        { XT_STAT_REC_SYNC_COUNT,       "Record File Flushes",  "rec", "syncs",         XT_STAT_ACCUMULATIVE | XT_STAT_COMBO_FIELD,
508
 
                "Number of flushes to record/row files" },
509
 
        { XT_STAT_REC_SYNC_TIME,        "Record Flush Time",    "rec", su_t_unit,       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
510
 
                "The time in %sseconds to flush record/row files" },
 
514
                "Bytes written from the record and row files" },
 
515
        { XT_STAT_REC_SYNC_COUNT,       "Record File Syncs",    "rec", "syncs",         XT_STAT_ACCUMULATIVE | XT_STAT_COMBO_FIELD,
 
516
                "Number of syncs (flushes) to record and row files" },
 
517
        { XT_STAT_REC_SYNC_TIME,        "Record Sync Time",     "rec", su_sync_time_unit,       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
 
518
                "The time in %sseconds spent syncing (flushing) record and row files" },
511
519
        { XT_STAT_REC_CACHE_HIT,        "Record Cache Hits",    "rec", "hits",          XT_STAT_ACCUMULATIVE,
512
520
                "Hits when accessing the record cache" },
513
521
        { XT_STAT_REC_CACHE_MISS,       "Record Cache Misses",  "rec", "miss",          XT_STAT_ACCUMULATIVE,
521
529
                "Bytes read from the index files" },
522
530
        { XT_STAT_IND_BYTES_OUT,        "Index Bytes Written",  "ind", "out",           XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
523
531
                "Bytes written from the index files" },
524
 
        { XT_STAT_IND_SYNC_COUNT,       "Index File Flushes",   "ind", "syncs",         XT_STAT_ACCUMULATIVE | XT_STAT_COMBO_FIELD,
525
 
                "Number of flushes to index files" },
526
 
        { XT_STAT_IND_SYNC_TIME,        "Index Flush Time",             "ind", su_t_unit,       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
527
 
                "The time in %sseconds to flush index files" },
 
532
        { XT_STAT_IND_SYNC_COUNT,       "Index File Syncs",     "ind", "syncs",         XT_STAT_ACCUMULATIVE | XT_STAT_COMBO_FIELD,
 
533
                "Number of syncs (flushes) to index files" },
 
534
        { XT_STAT_IND_SYNC_TIME,        "Index Sync Time",              "ind", su_sync_time_unit,       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
 
535
                "The time in %sseconds spent syncing (flushing) index files" },
528
536
        { XT_STAT_IND_CACHE_HIT,        "Index Cache Hits",             "ind", "hits",          XT_STAT_ACCUMULATIVE,
529
537
                "Hits when accessing the index cache" },
530
538
        { XT_STAT_IND_CACHE_MISS,       "Index Cache Misses",   "ind", "miss",          XT_STAT_ACCUMULATIVE,
536
544
        { XT_STAT_ILOG_BYTES_OUT,       "Index Log Bytes Out",  "ilog", "out",          XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
537
545
                "Bytes written from the index log files" },
538
546
        { XT_STAT_ILOG_SYNC_COUNT,      "Index Log File Syncs", "ilog", "syncs",        XT_STAT_ACCUMULATIVE | XT_STAT_COMBO_FIELD,
539
 
                "Number of flushes to index log files" },
540
 
        { XT_STAT_ILOG_SYNC_TIME,       "Index Log Sync Time",  "ilog", su_t_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
541
 
                "The time in %sseconds to flush index log files" },
 
547
                "Number of syncs (flushes) to index log files" },
 
548
        { XT_STAT_ILOG_SYNC_TIME,       "Index Log Sync Time",  "ilog", su_sync_time_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE | XT_STAT_COMBO_FIELD_2,
 
549
                "The time in %sseconds spent syncing (flushing) index log files" },
542
550
 
543
 
        { XT_STAT_XLOG_BYTES_IN,        "Xact Log Bytes In",    "xlog", "in",           XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
 
551
        { XT_STAT_XLOG_BYTES_IN,        "Trx Log Bytes In",     "xlog", "in",           XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
544
552
                "Bytes read from the transaction log files" },
545
 
        { XT_STAT_XLOG_BYTES_OUT,       "Xact Log Bytes Out",   "xlog", "out",          XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
 
553
        { XT_STAT_XLOG_BYTES_OUT,       "Trx Log Bytes Out",    "xlog", "out",          XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
546
554
                "Bytes written from the transaction log files" },
547
 
        { XT_STAT_XLOG_SYNC_COUNT,      "Xact Log File Syncs",  "xlog", "syncs",        XT_STAT_ACCUMULATIVE,
548
 
                "Number of flushes to transaction log files" },
549
 
        { XT_STAT_XLOG_SYNC_TIME,       "Xact Log Sync Time",   "xlog", su_t_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
550
 
                "The time in %sseconds to flush transaction log files" },
551
 
        { XT_STAT_XLOG_CACHE_HIT,       "Xact Log Cache Hits",  "xlog", "hits",         XT_STAT_ACCUMULATIVE,
 
555
        { XT_STAT_XLOG_SYNC_COUNT,      "Trx Log File Syncs",   "xlog", "syncs",        XT_STAT_ACCUMULATIVE,
 
556
                "Number of syncs (flushes) to transaction log files" },
 
557
        { XT_STAT_XLOG_SYNC_TIME,       "Trx Log Sync Time",    "xlog", su_sync_time_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
558
                "The time in %sseconds spent syncing (flushing) transaction log files" },
 
559
        { XT_STAT_XLOG_CACHE_HIT,       "Trx Log Cache Hits",   "xlog", "hits",         XT_STAT_ACCUMULATIVE,
552
560
                "Hits when accessing the transaction log cache" },
553
 
        { XT_STAT_XLOG_CACHE_MISS,      "Xact Log Cache Misses","xlog", "miss",         XT_STAT_ACCUMULATIVE,
 
561
        { XT_STAT_XLOG_CACHE_MISS,      "Trx Log Cache Misses","xlog", "miss",          XT_STAT_ACCUMULATIVE,
554
562
                "Misses when accessing the transaction log cache" },
555
 
        { XT_STAT_XLOG_CACHE_USAGE,     "Xact Log Cache Usage", "xlog", "%use",         XT_STAT_PERCENTAGE,
 
563
        { XT_STAT_XLOG_CACHE_USAGE,     "Trx Log Cache Usage",  "xlog", "%use",         XT_STAT_PERCENTAGE,
556
564
                "Percentage of transaction log cache used" },
557
565
 
558
566
        { XT_STAT_DATA_BYTES_IN,        "Data Log Bytes In",    "data", "in",           XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
560
568
        { XT_STAT_DATA_BYTES_OUT,       "Data Log Bytes Out",   "data", "out",          XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
561
569
                "Bytes written from the data log files" },
562
570
        { XT_STAT_DATA_SYNC_COUNT,      "Data Log File Syncs",  "data", "syncs",        XT_STAT_ACCUMULATIVE,
563
 
                "Number of flushes to data log files" },
564
 
        { XT_STAT_DATA_SYNC_TIME,       "Data Log Sync Time",   "data", su_t_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
565
 
                "The time in %sseconds to flush data log files" },
 
571
                "Number of syncs (flushes) to data log files" },
 
572
        { XT_STAT_DATA_SYNC_TIME,       "Data Log Sync Time",   "data", su_sync_time_unit,      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
573
                "The time in %sseconds spent syncing (flushing) data log files" },
566
574
 
567
575
        { XT_STAT_BYTES_TO_CHKPNT,      "Bytes to Checkpoint",  "to", "chkpt",          XT_STAT_BYTE_COUNT,
568
576
                "Bytes written to the log since the last checkpoint" },
570
578
                "Bytes written to the log, still to be written to the database" },
571
579
        { XT_STAT_BYTES_TO_SWEEP,       "Log Bytes to Sweep",   "to", "sweep",          XT_STAT_BYTE_COUNT,
572
580
                "Bytes written to the log, still to be read by the sweeper" },
573
 
        { XT_STAT_SWEEPER_WAITS,        "Sweeper Wait on Xact", "sweep", "waits",       XT_STAT_ACCUMULATIVE,
 
581
        { XT_STAT_SWEEPER_WAITS,        "Sweeper Wait on Trx",  "sweep", "waits",       XT_STAT_ACCUMULATIVE,
574
582
                "Attempts to cleanup a transaction" },
575
583
 
576
584
        { XT_STAT_SCAN_INDEX,           "Index Scan Count",             "scan", "index",        XT_STAT_ACCUMULATIVE,
594
602
        { XT_STAT_IND_CACHE_DIRTY,      "Index Cache Dirty",    "ind", "%dty",          XT_STAT_PERCENTAGE,
595
603
                "Percentage of index cache that is dirty" },
596
604
 
597
 
#ifdef XT_TIME_DISK_WRITES
598
 
        { XT_STAT_REC_WRITE_TIME,       "Record Write Time",    "rec", "w/ms",          XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
599
 
                "The time in %sseconds to write record/row files" },
600
 
        { XT_STAT_IND_WRITE_TIME,       "Index Write Time",     "ind", "w/ms",          XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
601
 
                "The time in %sseconds to write index files" },
602
 
        { XT_STAT_ILOG_WRITE_TIME,      "Index Log Write Time", "ilog", "w/ms",         XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
603
 
                "The time in %sseconds to index log files" },
604
 
        { XT_STAT_XLOG_WRITE_TIME,      "Xact Log Write Time",  "*xlog", "w/ms",                XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
605
 
                "The time in %sseconds to transaction log files" },
606
 
        { XT_STAT_DATA_WRITE_TIME,      "Data Log Write Time",  "*data", "w/ms",                XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
607
 
                "The time in %sseconds to write data log files" }
608
 
#endif
609
 
 
610
 
#ifdef XT_TIME_DISK_READS
611
 
    ,
612
 
        { XT_STAT_REC_READ_TIME,        "Record Read Time",     "rec", "r/ms",          XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
613
 
                "The time in %sseconds to read record/row files" },
614
 
        { XT_STAT_IND_READ_TIME,        "Index Read Time",      "ind", "r/ms",          XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
615
 
                "The time in %sseconds to read index files" },
616
 
        { XT_STAT_LOG_READ_TIME,        "Log Read Time",        "log", "r/ms",          XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
617
 
                "The time in %sseconds to read index, transaction and data log files" },
618
 
#endif
 
605
        { XT_STAT_REC_WRITE_TIME,       "Record Write Time",    "rec", su_write_time_unit,              XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
606
                "The time in %sseconds spent writing record and row files" },
 
607
        { XT_STAT_IND_WRITE_TIME,       "Index Write Time",             "ind", su_write_time_unit,                      XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
608
                "The time in %sseconds spent writing index files" },
 
609
        { XT_STAT_ILOG_WRITE_TIME,      "Index Log Write Time", "ilog", su_write_time_unit,             XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
610
                "The time in %sseconds spent writing index log files" },
 
611
        { XT_STAT_XLOG_WRITE_TIME,      "Trx Log Write Time",   "xlog", su_write_time_unit,             XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
612
                "The time in %sseconds spent writing transaction log files" },
 
613
        { XT_STAT_DATA_WRITE_TIME,      "Data Log Write Time",  "data", su_write_time_unit,             XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
614
                "The time in %sseconds spent writing data log files" },
 
615
 
 
616
        { XT_STAT_REC_READ_TIME,        "Record Read Time",             "rec", su_read_time_unit,                       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
617
                "The time in %sseconds spent reading record and row files" },
 
618
        { XT_STAT_IND_READ_TIME,        "Index Read Time",              "ind", su_read_time_unit,                       XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
619
                "The time in %sseconds spent reading index files" },
 
620
        { XT_STAT_ILOG_READ_TIME,       "Index Log Read Time",  "ilog", su_read_time_unit,              XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
621
                "The time in %sseconds spent reading index log files" },
 
622
        { XT_STAT_XLOG_READ_TIME,       "Trx Log Read Time",    "xlog", su_read_time_unit,              XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
623
                "The time in %sseconds spent reading the transaction log files" },
 
624
        { XT_STAT_DATA_READ_TIME,       "Data Log Read Time",   "data", su_read_time_unit,              XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
625
                "The time in %sseconds spent reading the data log file" },
 
626
 
 
627
        { XT_STAT_DLOG_CACHE_HIT,       "Data Log Cache Hits",  "data", "hits",         XT_STAT_ACCUMULATIVE,
 
628
                "Hits when accessing the data log cache" },
 
629
        { XT_STAT_DLOG_CACHE_MISS,      "Data Log Cache Misses","data", "miss",         XT_STAT_ACCUMULATIVE,
 
630
                "Misses when accessing the data log cache" },
 
631
        { XT_STAT_DLOG_CACHE_USAGE,     "Data Log Cache Usage", "data", "%use",         XT_STAT_PERCENTAGE,
 
632
                "Percentage of data log cache used" },
 
633
 
 
634
        { XT_STAT_L2_DATA_BYTES_IN,             "Data Log L2 Cache Bytes In",           "l2dat", "in",                          XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
 
635
                "Bytes read from the data log level 2 cache file" },
 
636
        { XT_STAT_L2_DATA_BYTES_OUT,    "Data Log L2 Cache Bytes Out",          "l2dat", "out",                         XT_STAT_ACCUMULATIVE | XT_STAT_BYTE_COUNT,
 
637
                "Bytes written to the data log level 2 cache file" },
 
638
        { XT_STAT_L2_DATA_WRITE_TIME,   "Data Log L2 Cache Write Time",         "l2dat", su_write_time_unit,XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
639
                "The time in %sseconds spent writing the data log level 2 cache" },
 
640
        { XT_STAT_L2_DATA_READ_TIME,    "Data Log L2 Cache Read Time",          "l2dat", su_read_time_unit,     XT_STAT_ACCUMULATIVE | XT_STAT_TIME_VALUE,
 
641
                "The time in %sseconds spent reading the data log level 2 cache" },
 
642
        { XT_STAT_L2_DLOG_CACHE_HIT,    "Data Log L2 Cache Hits",                       "l2dat", "hits",                        XT_STAT_ACCUMULATIVE,
 
643
                "Hits when accessing the data log level 2 cache" },
 
644
        { XT_STAT_L2_DLOG_CACHE_MISS,   "Data Log L2 Cache Misses",                     "l2dat", "miss",                        XT_STAT_ACCUMULATIVE,
 
645
                "Misses when accessing the data log level 2 cache" },
 
646
        { XT_STAT_L2_DLOG_CACHE_USAGE,  "Data Log L2 Cache Usage",                      "l2dat", "%use",                        XT_STAT_PERCENTAGE,
 
647
                "Percentage of data log level 2 cache used" }
619
648
};
620
649
 
621
650
static int pbxt_stat_meta_order[XT_STAT_MAXIMUM] = {
629
658
        XT_STAT_STAT_WRITES,
630
659
        XT_STAT_REC_BYTES_IN,
631
660
        XT_STAT_REC_BYTES_OUT,
632
 
#ifdef XT_TIME_DISK_READS
633
661
        XT_STAT_REC_READ_TIME,
634
 
#endif
635
 
#ifdef XT_TIME_DISK_WRITES
636
662
        XT_STAT_REC_WRITE_TIME,
637
 
#endif
638
663
        XT_STAT_REC_SYNC_COUNT,
639
664
        XT_STAT_REC_SYNC_TIME,
640
665
        XT_STAT_REC_CACHE_HIT,
643
668
        XT_STAT_REC_CACHE_USAGE,
644
669
        XT_STAT_IND_BYTES_IN,
645
670
        XT_STAT_IND_BYTES_OUT,
646
 
#ifdef XT_TIME_DISK_READS
647
671
        XT_STAT_IND_READ_TIME,
648
 
#endif
649
 
#ifdef XT_TIME_DISK_WRITES
650
672
        XT_STAT_IND_WRITE_TIME,
651
 
#endif
652
673
        XT_STAT_IND_SYNC_COUNT,
653
674
        XT_STAT_IND_SYNC_TIME,
654
675
        XT_STAT_IND_CACHE_HIT,
657
678
        XT_STAT_IND_CACHE_DIRTY,
658
679
        XT_STAT_ILOG_BYTES_IN,
659
680
        XT_STAT_ILOG_BYTES_OUT,
660
 
#ifdef XT_TIME_DISK_WRITES
 
681
        XT_STAT_ILOG_READ_TIME,
661
682
        XT_STAT_ILOG_WRITE_TIME,
662
 
#endif
663
683
        XT_STAT_ILOG_SYNC_COUNT,
664
684
        XT_STAT_ILOG_SYNC_TIME,
665
685
        XT_STAT_XLOG_BYTES_IN,
666
686
        XT_STAT_XLOG_BYTES_OUT,
667
 
#ifdef XT_TIME_DISK_WRITES
 
687
        XT_STAT_XLOG_READ_TIME,
668
688
        XT_STAT_XLOG_WRITE_TIME,
669
 
#endif
670
689
        XT_STAT_XLOG_SYNC_COUNT,
671
690
        XT_STAT_XLOG_SYNC_TIME,
672
691
        XT_STAT_XLOG_CACHE_HIT,
674
693
        XT_STAT_XLOG_CACHE_USAGE,
675
694
        XT_STAT_DATA_BYTES_IN,
676
695
        XT_STAT_DATA_BYTES_OUT,
677
 
#ifdef XT_TIME_DISK_WRITES
 
696
        XT_STAT_DATA_READ_TIME,
678
697
        XT_STAT_DATA_WRITE_TIME,
679
 
#endif
680
698
        XT_STAT_DATA_SYNC_COUNT,
681
699
        XT_STAT_DATA_SYNC_TIME,
 
700
        XT_STAT_DLOG_CACHE_HIT,
 
701
        XT_STAT_DLOG_CACHE_MISS,
 
702
        XT_STAT_DLOG_CACHE_USAGE,
 
703
        XT_STAT_L2_DATA_BYTES_IN,
 
704
        XT_STAT_L2_DATA_BYTES_OUT,
 
705
        XT_STAT_L2_DATA_READ_TIME,
 
706
        XT_STAT_L2_DATA_WRITE_TIME,
 
707
        XT_STAT_L2_DLOG_CACHE_HIT,
 
708
        XT_STAT_L2_DLOG_CACHE_MISS,
 
709
        XT_STAT_L2_DLOG_CACHE_USAGE,
682
710
        XT_STAT_BYTES_TO_CHKPNT,
683
 
#ifdef XT_TIME_DISK_READS
684
 
        XT_STAT_LOG_READ_TIME,
685
 
#endif
686
711
        XT_STAT_LOG_BYTES_TO_WRITE,
687
712
        XT_STAT_BYTES_TO_SWEEP,
688
713
        XT_STAT_SWEEPER_WAITS,
707
732
        return pbxt_stat_meta_order[i];
708
733
}
709
734
 
710
 
xtPublic void xt_set_time_unit(const char *u)
 
735
xtPublic void xt_set_time_unit_millisec()
711
736
{
712
 
        xt_strcpy(10, su_t_unit, u);
 
737
        xt_strcpy(10, su_time_unit, su_time_ms);
 
738
        xt_strcpy(10, su_read_time_unit, su_read_time_ms);
 
739
        xt_strcpy(10, su_write_time_unit, su_write_time_ms);
 
740
        xt_strcpy(10, su_sync_time_unit, su_sync_time_ms);
713
741
}
714
742