commit | 4c2f3e9227e104b2b81056869aabb219fafbc490 | [log] [tgz] |
---|---|---|
author | Victor Costan <[email protected]> | Tue Aug 21 04:47:59 2018 |
committer | Commit Bot <[email protected]> | Tue Aug 21 04:47:59 2018 |
tree | a3222a4630ded2821df362abadee6905869b4059 | |
parent | fc8f959d596a079a55449b3ea84e7c63736a2a56 [diff] [blame] |
sql: Feature flag for in-memory temporary storage. This CL introduces SqlTempStoreMemory flag, which is intended to be managed via Finch. When set, the flag causes sql::Database to run a PRAGMA temp_store=MEMORY [1] query on every opened database. This approach is intended to approximate the effect of building SQLite with the SQLITE_TEMP_STORE=3 [2] macro, to measure the memory consumption impact. Ideally, we'd test the macro directly, but //sql is a core component of Chrome, so we can't load different versions of it based on Finch. [1] https://www.sqlite.org/pragma.html#pragma_temp_store [2] https://www.sqlite.org/compile.html#temp_store Bug: 875538 Change-Id: I537d90d763be1100503ed4bd2ada2ee19eb090bb Reviewed-on: https://chromium-review.googlesource.com/1180530 Reviewed-by: Mark Pearson <[email protected]> Reviewed-by: Chris Mumford <[email protected]> Commit-Queue: Victor Costan <[email protected]> Cr-Commit-Position: refs/heads/master@{#584652}
diff --git a/sql/sql_features.h b/sql/sql_features.h new file mode 100644 index 0000000..4b0c947 --- /dev/null +++ b/sql/sql_features.h
@@ -0,0 +1,21 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SQL_SQL_FEATURES_H_ +#define SQL_SQL_FEATURES_H_ + +#include "base/feature_list.h" +#include "sql/sql_export.h" + +namespace sql { + +namespace features { + +SQL_EXPORT extern const base::Feature kSqlTempStoreMemory; + +} // namespace features + +} // namespace sql + +#endif // SQL_SQL_FEATURES_H_