-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tracemalloc * pympler * todo * changed position of tracemalloc stats collection * updated requirements.txt * memory leak fix and cleanup * removed todo * changed printing to logging * alphabetical order * changes to tracemalloc usage * plot memory usage * memory writer terminates with performance writer * add MemoryStat table to database * remove todo * switch from writing/reading memory using file to saving/retrieving from database * add memory legend to performance plot * prevent error from child processes terminating * style changes * moved PLOT_PERFORMANCE to config.py * only display memory legend if there is memory data * moved memory logging into function * removed unnecessary call to row2dicts * rename memory_usage to memory_usage_bytes * replaced alembic revision * remove start_time_deltas; minor refactor * fix indent --------- Co-authored-by: Krish Patel <[email protected]> Co-authored-by: Richard Abrich <[email protected]> Co-authored-by: Richard Abrich <[email protected]>
- Loading branch information
1 parent
2bb8814
commit ef0d5eb
Showing
7 changed files
with
216 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""add MemoryStat | ||
Revision ID: 607d1380b5ae | ||
Revises: 104d4a614d95 | ||
Create Date: 2023-06-28 11:54:36.749072 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from openadapt.models import ForceFloat | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '607d1380b5ae' | ||
down_revision = '104d4a614d95' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('memory_stat', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('recording_timestamp', sa.Integer(), nullable=True), | ||
sa.Column('memory_usage_bytes', ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True), | ||
sa.Column('timestamp', ForceFloat(precision=10, scale=2, asdecimal=False), nullable=True), | ||
sa.PrimaryKeyConstraint('id', name=op.f('pk_memory_stat')) | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('memory_stat') | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.