https://github.com/myraspberry/pico_w_webtest
timecheck about server.poll()
https://github.com/myraspberry/pico_w_webtest
Last synced: about 1 year ago
JSON representation
timecheck about server.poll()
- Host: GitHub
- URL: https://github.com/myraspberry/pico_w_webtest
- Owner: MyRaspberry
- Created: 2023-12-15T18:51:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-17T07:35:17.000Z (over 2 years ago)
- Last Synced: 2025-01-17T23:31:45.639Z (about 1 year ago)
- Language: Python
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
test pico w with CP900a6 webserver
[issues](https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/issues/46#issuecomment-1857797943)
system files:
```
flash_nuke.uf2
adafruit-circuitpython-raspberry_pi_pico_w-en_US-9.0.0-alpha.6.uf2
adafruit-circuitpython-bundle-9.x-mpy-20231215.zip
```
boot_out.txt
```
Adafruit CircuitPython 9.0.0-alpha.6 on 2023-12-12; Raspberry Pi Pico W with rp2040
Board ID:raspberry_pi_pico_w
```
test 1 results:
-a-
1Mloop only
9.8 sec mem: 47952 mem low: 45072
-b-
1Mloop and loop1
18.0 sec mem:47800 mem low: 45206
-c-
1Mloop and loop1 run_webserver
18.7 sec mem: 47600 mem low: 47584
-d-
1Mloop and loop1 run_webserver and webpage / autorefresh 5 sec
21.4 sec mem: 52320 mem low: 47584
no gc.collect at run_webserver mem: 52240 mem low:46672
-e-
need change loopt1 from 1000 to 10 to have a 1 sec tick
run_webserver in main loop ( delete 2 front [tab] )
1Mloop and loop1
226.1 sec mem: 52480 mem low: 18912
-e+f-
start webpage / autorefresh 5 sec but sometimes need 20 sec?
233.4 sec mem: 52480 mem low: 27872
-e+f+g-
test mem for it without gc.collect
mem: 52160 mem low: 672 ? // mem runs down but autorecovers ?
!!! server.poll() is a timing and memory pig !!!
[memory downloop](http://kll.byethost7.com/kllfusion01/downloads/server_poll_memory.png)
test 2
replace /adafruit_httpserver/server.mpy with server.py
from https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer/blame/main/adafruit_httpserver/server.py
? how i know that is the one used in adafruit-circuitpython-bundle-9.x-mpy-20231215.zip
change:
def __init__(
self, socket_source: Protocol, root_path: str = None, *, debug: bool = True # KLL test False
) -> None:
see:
www served dynamic index.html
192.168.1.8 -- "GET /" 373 -- "200 OK" 1174 -- 293ms
BUT
```
if self.debug:
_debug_response_sent(response, _debug_end_time - _debug_start_time)
```
i not see timing for every poll(), only for page request, how to do?
test 3
asyncio
import failed about
```
File "asyncio/core.py", line 18, in
ImportError: no module named 'adafruit_ticks'
```