Skip to Content
파이썬 비동기 라이브러리 Asyncio
book

파이썬 비동기 라이브러리 Asyncio

by 동동구, 케일럽 해팅
May 2021
Beginner to intermediate
176 pages
3h 37m
Korean
Hanbit Media, Inc.
Content preview from 파이썬 비동기 라이브러리 Asyncio
169
부록
B
보충 자료
<canvas id="cpu_chart" style="width:100%; height:300px">
</canvas>
<hr>
<h1>Memory usage (MB)</h1>
<canvas id="mem_chart" style="width:100%; height:300px">
</canvas>
cpu
mem
은 각각 색상과
TimeSeries
()
인스턴스 간의 매핑이다.
② 차트 인스턴스 하나는
CPU
에 대한 것이고 다른 하나는 메모리에 대한 것이다.
EventSource
()
인스턴스의
onmessage
이벤트
내부
에서
TimeSeries
()
인스턴스
를 생성한다. 즉, 새로운 데이터 (예를 들면 다른 색상 )가 전달되면 자동으로 새로운
TimeSeries
()
인스턴스를 생성한다.
add
_
timeseries
()
함수는
TimeSeries
()
인스턴스
를 생성하고 전달된 차트 인스턴스에 추가한다.
/
feed
URL
에 대해 새로운
EventSource
()
를 생성한다. 브라우저는 서버 (
metric
_
server
.
py
)의 이 엔드포인트에 접속한다. 연결이 끊기면 브라우저가 자동으로 재접속한
다.
SSE
는 무시되는 경우가 있지만, 단순성으로 인해 웹소켓보다 선호된다.
onmessage
이벤트는 서버에서 데이터를
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

프로그래머의 길 멘토에게 묻다

프로그래머의 길 멘토에게 묻다

David Hoover, Adewale Oshineye, Kang Jung Bin
파이썬 라이브러리를 활용한 텍스트 분석

파이썬 라이브러리를 활용한 텍스트 분석

젠스 알브레히트, 싯다르트 라마찬드란, 크리스티안 윙클러

Publisher Resources

ISBN: 9791162244197