Marc Mueller
e382f924e6
Add support for Python 3.13 ( #129442 )
2024-11-10 11:38:56 +01:00
Marc Mueller
ca55986057
Import Generator from collections.abc (1) ( #120914 )
2024-07-01 11:51:51 +02:00
Marc Mueller
fe21e2b8ba
Import Generator from typing_extensions (1) ( #118986 )
2024-06-06 17:02:13 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 ( #116250 )
2024-05-07 14:00:27 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 ( #115735 )
2024-05-06 20:33:26 +02:00
J. Nick Koston
8bfcaf3524
Add service to log all the current asyncio Tasks to the profiler ( #116389 )
...
* Add service to log all the current asyncio Tasks to the profiler
I have been helping users look for a task leaks, and need a
way to examine tasks at run time as trying to get someone to
run Home Assistant and attach aiomonitor is too difficult in
many cases.
* cover
2024-04-29 10:03:35 -05:00
J. Nick Koston
af06e03b71
Add profiler set_asyncio_debug service ( #113447 )
...
* Add profiler set_asyncio_debug service
Currently when a user has a problem with there event loop being blocked
the simplest way to enable asyncio debug is to add `debugpy:` to
`configuration.yaml`, however this approach slows the system which
makes the report less useful and harder to track down the problem.
We need a lightweight way to enable debug mode so users can report
problems with the event loop being blocked, and we have a better
chance of finding the source without side effects
* logging
* logging
* logging
* comments
* fix
* icon
* only if enabled
* coverage
2024-03-15 20:49:35 -04:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] ( #112736 )
2024-03-08 19:15:59 +01:00
J. Nick Koston
93a76ab519
Fix profiler.lru_stats always throwing an exception ( #111249 )
...
Remove IntegrationMatcher as its now a slotted class and cannot
be examined with the current methods (we also likely do not need
to optimize it anymore)
```
File "/usr/src/homeassistant/homeassistant/components/profiler/__init__.py", line 201, in _lru_stats
for maybe_lru in class_with_lru_attr.__dict__.values():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'IntegrationMatcher' object has no attribute '__dict__'. Did you mean: '__dir__'?
```
2024-02-24 16:26:01 -05:00
J. Nick Koston
5c503683b7
Bump lru-dict to 1.3.0 ( #105914 )
...
* Bump lru-dict to 1.3.0
changelog: https://github.com/amitdev/lru-dict/compare/v1.2.0...v1.3.0
* fix typing
* quote types
* quote types
2023-12-18 00:16:31 +01:00
Franck Nijhof
5ff6779f5c
Update guppy3 to 3.1.4 ( #102400 )
2023-10-20 20:20:17 +02:00
Marc Mueller
ba91aaa28d
Add support for Python 3.12 ( #101651 )
2023-10-10 21:34:49 +02:00
J. Nick Koston
e9c3f0821f
Fix dumping lru stats in the profiler ( #97303 )
2023-07-27 09:17:27 +02:00
J. Nick Koston
9c039a17ea
Bump guppy3 to 3.1.3 ( #93124 )
2023-05-16 08:26:17 +02:00
J. Nick Koston
4c767b2f72
Generate a seperate log message per dumped object for profiler.dump_log_objects ( #90867 )
...
Since some objects are very large we can generate overly large log messages
```
Event data for system_log_event exceed maximum size of 32768 bytes. This can cause database performance issues; Event data will not be stored
```
Reported in 1093069996
2023-04-05 20:53:19 -04:00
J. Nick Koston
51ff027fce
Add object source logger to profiler ( #90650 )
...
* Add object source logger to profiler
* fixes
* cleanup
* tweaks
* logging
* logging
* too intensive
* adjust
* Update homeassistant/bootstrap.py
* fixes
* fixes
* coverage
2023-04-02 20:54:21 -04:00
J. Nick Koston
9dc936f8b9
Add sqlalchemy LRUs to the profiler lru service ( #90428 )
2023-03-28 12:02:35 -10:00
J. Nick Koston
dc37d92197
Add lru stats to the profiler integration ( #90388 )
2023-03-28 08:34:56 +02:00
J. Nick Koston
61539686a4
Disable profiler.memory service with python 3.11 ( #88136 )
2023-02-15 16:20:47 +01:00
Franck Nijhof
94755a5773
String formatting and max line length - Part 4 ( #84445 )
...
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-12-23 13:27:27 +01:00
epenet
ba18e11308
Remove profiler from mypy ignore list ( #74453 )
2022-07-11 18:34:27 +02:00
J. Nick Koston
a9a5645255
Defer profiler imports until needed to reduce memory pressure ( #70202 )
2022-04-17 20:16:25 -10:00
J. Nick Koston
bfe94f1cc5
Fix profiler dumping object when repr fails ( #67674 )
...
* Fix profiler dumping object when repr fails
* cover
2022-03-08 10:33:08 +01:00
Erik Montnemery
a672dc3437
Import persistent notification (part 4) ( #63901 )
2022-01-11 16:57:40 +01:00
epenet
803eaa8e22
Ensure admin service calls are typed ( #63093 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:12:40 +01:00
tkdrob
d1c4d0de49
Use bool annotations for setup entries ( #51166 )
2021-05-27 17:39:06 +02:00
tkdrob
664075962f
Clean up profiler constants ( #49752 )
2021-04-27 10:04:45 -04:00
J. Nick Koston
7f6572893d
Add services to the profiler to log threads and event loop schedule ( #49327 )
...
* Add services to the profiler to log threads and event loop schedule
* improve readability
* increase log debug
* bigger
* tweaks
* Update homeassistant/components/profiler/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/profiler/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* remove schema= and cleanup existing
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-19 11:39:34 +02:00
Franck Nijhof
969c147b77
Clean up superfluous integration setup - part 4 ( #49295 )
...
* Clean up superfluous integration setup - part 4
* Adjust tests
2021-04-16 17:46:49 +02:00
J. Nick Koston
add50cb33a
Add services to log and dump objects to the profiler to help track down memory leaks ( #42951 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-11-09 10:54:18 -10:00
Jason Hunter
2a795c0397
Add guppy3 memory profile to Profiler integration ( #42435 )
...
* add guppy memory profile to profiler integration
* add output path to notification
* create new service for memory profile
* address review comments
2020-10-28 21:05:16 -04:00
Philip Allgaier
dde6305549
Cleanup unused loggers (components N-Z + tests) ( #41982 )
2020-10-16 21:24:08 -05:00
J. Nick Koston
494d4a262a
Add Profiler integration ( #41175 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-05 07:57:07 -05:00