System.Data.SQLite

Check-in [3fae72f823]
Login

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

Overview
Comment:Report memory currently in use by the CLR before and after each test file.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3fae72f823fed2b4120b26a2aef3f8ce022663de
User & Date: mistachkin 2011-12-16 07:09:47.172
Context
2011-12-16
08:33
Allow the directory used for test databases to be easily overridden for the vast majority of tests. check-in: b35fffe201 user: mistachkin tags: trunk
07:09
Report memory currently in use by the CLR before and after each test file. check-in: 3fae72f823 user: mistachkin tags: trunk
04:31
Merge all IDisposable pattern fixes to trunk. check-in: 419bfbd2ee user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/common.eagle.
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
        #
        set code 0
      }

      return $code
    }

    proc reportSQLiteResources { channel {quiet false} } {
      #
      # NOTE: Skip all output if we are running in "quiet" mode.
      #
      if {!$quiet} then {
        tputs $channel "---- current memory in use by SQLite... "
      }








|







522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
        #
        set code 0
      }

      return $code
    }

    proc reportSQLiteResources { channel {quiet false} {collect true} } {
      #
      # NOTE: Skip all output if we are running in "quiet" mode.
      #
      if {!$quiet} then {
        tputs $channel "---- current memory in use by SQLite... "
      }

564
565
566
567
568
569
570



































571
572
573
574
575
576
577
          tputs $channel [appendArgs $memory " bytes\n"]
        }
      } else {
        #
        # NOTE: Maybe the SQLite native library is unavailable?
        #
        set memory unknown




































        if {!$quiet} then {
          tputs $channel [appendArgs $memory \n]
        }
      }

      return $result







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
          tputs $channel [appendArgs $memory " bytes\n"]
        }
      } else {
        #
        # NOTE: Maybe the SQLite native library is unavailable?
        #
        set memory unknown

        if {!$quiet} then {
          tputs $channel [appendArgs $memory \n]
        }
      }

      if {$collect} then {
        if {[catch {
                object invoke GC Collect
                object invoke GC WaitForPendingFinalizers
                object invoke GC Collect} error]} then {
          tputs $channel [appendArgs \
              "==== WARNING: failed to garbage collect, error: " \
              \n\t $error \n]
        }
      }

      if {!$quiet} then {
        tputs $channel "---- current memory in use by the CLR... "
      }

      if {[catch {getDictionaryValue [debug memory] gc} memory] == 0} then {
        if {[string is integer -strict $memory]} then {
          if {!$quiet} then {
            tputs $channel [appendArgs $memory " bytes\n"]
          }
        } else {
          set memory invalid

          if {!$quiet} then {
            tputs $channel [appendArgs $memory \n]
          }
        }
      } else {
        set memory unknown

        if {!$quiet} then {
          tputs $channel [appendArgs $memory \n]
        }
      }

      return $result