libfoedus-core
FOEDUS Core Library
device_emulation_options.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP.
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by the Free
5  * Software Foundation; either version 2 of the License, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11  * more details. You should have received a copy of the GNU General Public
12  * License along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * HP designates this particular file as subject to the "Classpath" exception
16  * as provided by HP in the LICENSE.txt file that accompanied this code.
17  */
20 namespace foedus {
21 namespace fs {
22 ErrorStack DeviceEmulationOptions::load(tinyxml2::XMLElement* element) {
28  return kRetOk;
29 }
30 
31 ErrorStack DeviceEmulationOptions::save(tinyxml2::XMLElement* element) const {
33  "Whether to disable Direct I/O and use non-direct I/O instead.");
35  "As if we write out to /dev/null. Used to measure performance w/o I/O.");
37  "additional CPU cycles to busy-wait for each seek. 0 (default) disables it.");
39  "additional CPU cycles to busy-wait for each 1KB read. 0 (default) disables it."
40  " For example, 4kb read is seek+scan*4 cycles, 1MB read is seek+scan*1000 cycles.");
42  "additional CPU cycles to busy-wait for each 1KB write. 0 (default) disables it.");
43  return kRetOk;
44 }
45 
46 } // namespace fs
47 } // namespace foedus
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
uint32_t emulated_seek_latency_cycles_
[Experiments] additional CPU cycles to busy-wait for each seek.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
Brings error stacktrace information as return value of functions.
Definition: error_stack.hpp:81
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
uint32_t emulated_write_kb_cycles_
[Experiments] additional CPU cycles to busy-wait for each 1KB write.
const ErrorStack kRetOk
Normal return value for no-error case.
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
bool null_device_
[Experiments] as if we write out to /dev/null.
uint32_t emulated_read_kb_cycles_
[Experiments] additional CPU cycles to busy-wait for each 1KB read.
bool disable_direct_io_
[Experiments] Whether to disable Direct I/O and use non-direct I/O instead.