System.Data.SQLite
Check-in [d0e28511f3]
Not logged in

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

Overview
Comment:For the debug build configuration only, keep track of how many times each runtime configuration setting is read and have the test suite report on same. Pursuant to [58ed318f2f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d0e28511f30527cf1dd6c664208a677239f66c60
User & Date: mistachkin 2014-07-29 22:48:24
References
2014-07-29
22:53 Ticket [58ed318f2f] GetValue hits the xml config file every time status still Open with 3 other changes artifact: b297f95088 user: mistachkin
Context
2014-07-30
00:39
Minimize usage of the 'Use_SQLiteConvert_DefaultDbType' and 'Use_SQLiteConvert_DefaultTypeName' settings. Fix for [58ed318f2f]. check-in: 69065c8e3b user: mistachkin tags: trunk
2014-07-29
22:48
For the debug build configuration only, keep track of how many times each runtime configuration setting is read and have the test suite report on same. Pursuant to [58ed318f2f]. check-in: d0e28511f3 user: mistachkin tags: trunk
22:42
Update the Entity Framework version. check-in: a5705bb3db user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/UnsafeNativeMethods.cs.

88
89
90
91
92
93
94











95
96
97
98
99
100
101
...
130
131
132
133
134
135
136









137
138
139
140
141
142
143
...
246
247
248
249
250
251
252





















253
254
255
256
257
258
259
      #region Private Data
      /// <summary>
      /// This lock is used to protect the static _SQLiteNativeModuleFileName,
      /// _SQLiteNativeModuleHandle, and processorArchitecturePlatforms fields.
      /// </summary>
      private static readonly object staticSyncRoot = new object();












      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This dictionary stores the mappings between processor architecture
      /// names and platform names.  These mappings are now used for two
      /// purposes.  First, they are used to determine if the assembly code
      /// base should be used instead of the location, based upon whether one
      /// or more of the named sub-directories exist within the assembly code
................................................................................
          if (GetSettingValue("No_PreLoadSQLite", null) != null)
              return;
#endif
#endif

          lock (staticSyncRoot)
          {









              //
              // TODO: Make sure this list is updated if the supported
              //       processor architecture names and/or platform names
              //       changes.
              //
              if (processorArchitecturePlatforms == null)
              {
................................................................................
      internal static string GetSettingValue(
          string name,    /* in */
          string @default /* in */
          )
      {
          if (name == null)
              return @default;






















          string value = null;

#if !PLATFORM_COMPACTFRAMEWORK
          bool expand = true;

          if (Environment.GetEnvironmentVariable("No_Expand") != null)







>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>







 







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







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
      #region Private Data
      /// <summary>
      /// This lock is used to protect the static _SQLiteNativeModuleFileName,
      /// _SQLiteNativeModuleHandle, and processorArchitecturePlatforms fields.
      /// </summary>
      private static readonly object staticSyncRoot = new object();


      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This dictionary stores the read counts for the runtime configuration
      /// settings.  This information is only recorded when compiled in the
      /// "Debug" build configuration.
      /// </summary>
#if DEBUG
      private static Dictionary<string, int> settingReadCounts;
#endif

      /////////////////////////////////////////////////////////////////////////
      /// <summary>
      /// This dictionary stores the mappings between processor architecture
      /// names and platform names.  These mappings are now used for two
      /// purposes.  First, they are used to determine if the assembly code
      /// base should be used instead of the location, based upon whether one
      /// or more of the named sub-directories exist within the assembly code
................................................................................
          if (GetSettingValue("No_PreLoadSQLite", null) != null)
              return;
#endif
#endif

          lock (staticSyncRoot)
          {
#if DEBUG
              //
              // NOTE: Create the list of statistics that will contain the
              //       number of times each setting value has been read.
              //
              if (settingReadCounts == null)
                  settingReadCounts = new Dictionary<string, int>();
#endif

              //
              // TODO: Make sure this list is updated if the supported
              //       processor architecture names and/or platform names
              //       changes.
              //
              if (processorArchitecturePlatforms == null)
              {
................................................................................
      internal static string GetSettingValue(
          string name,    /* in */
          string @default /* in */
          )
      {
          if (name == null)
              return @default;

          /////////////////////////////////////////////////////////////////////

          #region Debug Build Only
#if DEBUG
          //
          // NOTE: Update statistics for this setting value.
          //
          if (settingReadCounts != null)
          {
              int count;

              if (settingReadCounts.TryGetValue(name, out count))
                  settingReadCounts[name] = count + 1;
              else
                  settingReadCounts.Add(name, 1);
          }
#endif
          #endregion

          /////////////////////////////////////////////////////////////////////

          string value = null;

#if !PLATFORM_COMPACTFRAMEWORK
          bool expand = true;

          if (Environment.GetEnvironmentVariable("No_Expand") != null)

Changes to Tests/common.eagle.

2196
2197
2198
2199
2200
2201
2202
2203

2204
2205


2206

































2207
2208
2209
2210
2211
2212
2213
            tputs $channel [appendArgs \
                "---- call sqlite3_shutdown()... error: " \n\t $result \n]
          }
        }
      }
    }
 
    proc reportSQLiteResources { channel {quiet false} {collect true} } {

      #
      # NOTE: Skip all output if we are running in "quiet" mode.


      #

































      if {[haveConstraint \
              defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE] && \
          [haveConstraint \
              defineConstant.System.Data.SQLite.TRACK_MEMORY_BYTES]} then {
        if {!$quiet} then {
          tputs $channel "---- current memory in use by SQLiteMemory... "
        }







|
>

<
>
>

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







2196
2197
2198
2199
2200
2201
2202
2203
2204
2205

2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
            tputs $channel [appendArgs \
                "---- call sqlite3_shutdown()... error: " \n\t $result \n]
          }
        }
      }
    }
 
    proc reportSQLiteResources {
            channel {quiet false} {reset true} {collect true} } {
      #

      # NOTE: If available, report on (and possibly reset) the runtime
      #       configuration statistics.
      #
      if {[haveConstraint buildConfiguration.Debug] && [catch {
        object invoke -flags +NonPublic -alias \
            System.Data.SQLite.UnsafeNativeMethods settingReadCounts
      } settingReadCounts] == 0} then {
        set nameCount [$settingReadCounts Count]
        set valueCount 0

        object foreach -alias pair $settingReadCounts {
          incr valueCount [$pair Value]

          if {!$quiet} then {
            tputs $channel [appendArgs \
                "---- setting \"" [$pair Key] "\" was read " \
                [$pair Value] " times\n"]
          }
        }

        if {$reset} then {
          if {[catch {$settingReadCounts Clear} error] == 0} then {
            if {!$quiet} then {
              tputs $channel [appendArgs \
                  "---- reset setting statistics for the previous " \
                  $nameCount " names and " $valueCount " values read\n"]
            }
          } else {
            tputs $channel [appendArgs \
                "==== WARNING: failed to reset setting statistics for " \
                "the previous " $nameCount " names and " $valueCount \
                " values read, error: " \n\t $error \n]
          }
        }
      }

      if {[haveConstraint \
              defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE] && \
          [haveConstraint \
              defineConstant.System.Data.SQLite.TRACK_MEMORY_BYTES]} then {
        if {!$quiet} then {
          tputs $channel "---- current memory in use by SQLiteMemory... "
        }