A pretty much impossible task I would think. The power usage of SQLite compared to the power usage of different hardware components would be miniscule. But, there are so many other tasks running on a system, many in the background, that isolating SQLite from the rest would be next to impossible. Just look at process on a windows system via the task manager or a linux system using top to get a very simplistic idea of the different tasks that are using processor time - Sort by processor usage and the list is always changing even when you are doing nothing. Add in variable speed fans and processor throttling to manage temperature/power consumption etc. and you have a mammoth task.
Good luck :) Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional demo licence On 21 November 2017 at 00:36, Simon Slavin <slav...@bigfraud.org> wrote: > On 20 Nov 2017, at 10:54pm, Ali Dorri <alidorri...@gmail.com> wrote: > > > I am doing a research on the energy consumed by a query in SQLite. I > have a > > program which fills a database with blocks of data. Then, it attempts to > > remove some data from the database. I don't know how to measure the > energy > > consumed from my host, i.e., my laptop which has both the SQLite and the > > program, from the time I generated the query till the query is finished > and > > control returns back to my program. > > This is a hardware question, not anything to do with a particular piece of > software. > > If you have a desktop computer, get one of those gadgets that you plug > into the power socket and monitors how much power is passed to things that > plug into them: > > <https://www.amazon.co.uk/Plug-In-Power-and-Energy-Monitor/dp/B000Q7PJGW> > > On a laptop, since the power is taken from an internal battery, and mains > power is used to recharge it inconsistently, monitoring power usage from > the mains is pointless. See if the firmware provides a display or an API > function which shows how much is going out. > > Then set up side-by-side comparisons, one with your computer doing those > things in SQLite and one without. The differences between the two power > consumptions is how much power SQLite is using. Unless you have really > detailed power measurement, the results will be small and probably > meaningless. > > Since you mention doing side-by-side comparisons with other databases, > your setup should probably be comparing the same computer doing things in > different DBMSs. Maybe set up some procedure for doing something 10,000 > times and see how much power is used in total. > > Worth noting that power consumption from SQLite will be terribly > inconsistent, based on what data is cached, how many database pages need to > be accessed, and the state of the journal files. This pales into > insignificance, however, with the inconsistency of most other DBMSs, which > perform far more internal caching and indexing. You will get very > different results from the same setup depending on how long the DBMS server > has been running, not just on how long the computer has been turned on. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users