-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEATURE: Add stats_tcp_retrans() #750
base: develop
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
์ด์ ์ Offline์์ ๋ง์๋๋ฆฐ ๋ฐ๋ก ํ์ฌ ์ด์ PR๊ณผ ์ถฉ๋์ด ๋ ๊ด๊ณ๋ก
์ ํฌ ์ชฝ์์ ๋ง๋ ๋ก์ง์ธ ๊ฑด๊ฐ์? ์๋๋ฉด prometheus ์ ๋ก์ง์ธ๊ฐ์? @jhpark816 ๋๊ป์ ๋ง์ํ์ ๋๋ก stats lock์ ์ก๊ณ ๋ค์ด๊ฐ๊ธฐ์ ๊ทธ๋ฆฌ๊ณ /proc/net/snmp ๋ด ๋ด์ฉ์ ๋ณด๋ฉด ํฌ๊ธฐ๊ฐ ํฌ์ง ์์ ๊ฒ์ผ๋ก ๋ณด์ด๋ฏ๋ก |
a0815b2
to
f161e22
Compare
prometheus์์ ๋ง๋ ๋ก์ง์ ๋๋ค.
/proc/net/snmp ํ์ผ์ pseudo ํ์ผ๋ก, Disk IO๊ฐ ํ์ํ์ง ์๊ธฐ ๋๋ฌธ์ ๋งคํํ์ง ์์๋ ๋ ๊ฒ ๊ฐ์ต๋๋ค. https://unix.stackexchange.com/questions/8274/what-happens-when-i-open-and-read-from-proc
vCore 4๊ฐ ๊ธฐ์ค ๋ค์๊ณผ ๊ฐ์ ์ฑ๋ฅ์ ๋ณด์ ๋๋ค. 149.169391 seconds for call function 1000003 times.
0.000149 seconds per function call. ํ
์คํธ ์ฝ๋๋ ๋ค์๊ณผ ๊ฐ์ผ๋ฉฐ, uint64_t loop = 1000003;
void with_gettimeofday(void) {
uint64_t i = 0;
struct timeval start, end;
gettimeofday(&start, NULL);
for (i = 0; i < loop; i++) {
stats_tcp_retrans();
}
gettimeofday(&end, NULL);
double elapsed = (end.tv_sec - start.tv_sec) + ((end.tv_usec - start.tv_usec)/1000000.0);
printf("%lf seconds for call function %lld times.\n", elapsed, loop);
printf("%lf seconds per function call.\n", elapsed / loop);
}
int main() {
with_gettimeofday();
return 0;
} |
58cd6be
to
3c6329e
Compare
๐ Related Issue
โจ๏ธ What I did
/proc/net/snmp
file์์Tcp: RetransSegs
์ ํด๋นํ๋ ๊ฐ์int64_t
๋ก ๋ณํํฉ๋๋ค./proc/net/snmp
ํ์ผ ๋ด์ฉ ์์๋ ์๋์ ๊ฐ์ต๋๋ค.