stats: Add SQLite database as an output format
Review Request #1638 - Created Jan. 15, 2013 and updated
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9709:8a3d4a250bc9 --------------------------- stats: Add SQLite database as an output format This patch adds a second output format (in addition to the stats.txt) which stores the stats in an SQLite database using SQLAlchemy. The information about each stat is written to the database once to avoid repeated data. Each dump is given an accociated dump ID which is based on the the number of dumps stored in the database. To enable the SQL output, a parameter has been added to gem5. For example, ./build/ARM/gem5.fast --stats-db-file=stats.db .... will stored the stats in a file called "stats.db". By default SQL stats are disabled. In order to disable the text-based stats output use --stats-file="". For backwards compatibility the default behaviour creates stats.txt. In case SQLAlchemy is unavailable, only stats.txt is generated. If text-based stats are explicitly disabled, gem5 will fatal.
Generated a number of databases
Issue Summary
| Description | From | Last Updated | Status |
|---|---|---|---|
| Can this reopen an existing database? If so, the create_tables is going to be a problem. If not, does this ... | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
| Is it possible that subsequent calls to this have information that the initial ones do not? Do you support reopening ... | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
| the format of the identifier as "init_SQL" follows no existing convention in the code base that I know of :) ... | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
| this looks like an accidental duplicate | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
| This try catch seems superfluous. | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
| You're duplicating stuff here. Shouldn't create_tables simply be declared after all of the tables and simply be create_tables = Base.metadata.create_all | Nathan Binkert | April 25, 2013, 5:41 a.m. | Open |
-
src/python/m5/main.py (Diff revision 1) -
In the case where sql fails and you have a stats_file, will this initialize the stats file twice?
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+389 -4) |
-
src/python/m5/main.py (Diff revision 2) -
Why do you want this check here?
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+394 -4) |
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+410 -5) |
I'm glad to see you using a real database!
-
src/python/m5/stats/__init__.py (Diff revision 4) -
Can this reopen an existing database? If so, the create_tables is going to be a problem. If not, does this error out or delete the original?
-
src/python/m5/stats/__init__.py (Diff revision 4) -
Is it possible that subsequent calls to this have information that the initial ones do not? Do you support reopening an existing file to add data to it? If not, you should probably add some error code.
-
src/python/m5/stats/__init__.py (Diff revision 4) -
the format of the identifier as "init_SQL" follows no existing convention in the code base that I know of :) I'd prefer init_sql. Of course, we are inconsistent with how we treat
-
src/python/m5/stats/__init__.py (Diff revision 4) -
this looks like an accidental duplicate
-
src/python/m5/stats/sql.py (Diff revision 4) -
This try catch seems superfluous.
-
src/python/m5/stats/sql.py (Diff revision 4) -
You're duplicating stuff here. Shouldn't create_tables simply be declared after all of the tables and simply be create_tables = Base.metadata.create_all
