• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

oga's tools


コミットメタ情報

リビジョン35a3fac3377db3dd180f06724917ec8dcd80c0f6 (tree)
日時2016-01-18 07:29:00
作者oga <hyperoga@gmai...>
コミッターoga

ログメッセージ

netpf_send ver0.1 release

変更サマリ

差分

--- a/Makefile.win_mingw
+++ b/Makefile.win_mingw
@@ -51,9 +51,10 @@ TARGETS = $(VP)/age.exe $(VP)/cal.exe $(VP)/cgrep.exe $(VP)/csv2nocr.exe \
5151 $(VP)/midana.exe $(VP)/lanck.exe $(VP)/sysinfdsrv.exe $(VP)/findwin.exe \
5252 $(VP)/getsysm.exe $(VP)/midiapi.exe $(VP)/play.exe $(VP)/sendevt.exe \
5353 $(VP)/shutdown.exe $(VP)/sysperf.exe $(VP)/winmidisample.exe \
54- $(VP)/dgclient.exe $(VP)/dgserver.exe
54+ $(VP)/dgclient.exe $(VP)/dgserver.exe $(VP)/netpf.exe \
55+ $(VP)/netpf_send.exe
5556
56-TARGETS_MS = $(VP)/cpuid.exe $(VP)/ctrain.exe $(VP)/df.exe $(VP)/lsc.exe $(VP)/miscclient.exe $(VP)/miscserver.exe $(VP)/netpf.exe $(VP)/sndtimer.exe $(VP)/sysinfd.exe $(VP)/regsv.exe $(VP)/sysinfd_win.exe $(VP)/pcap_test.exe $(VP)/joytest.exe $(VP)/icmpsnd.exe $(VP)/getver.exe $(VP)/dxshow.exe $(VP)/clip.exe $(VP)/readevt.exe $(VP)/midic.exe
57+TARGETS_MS = $(VP)/cpuid.exe $(VP)/ctrain.exe $(VP)/df.exe $(VP)/lsc.exe $(VP)/miscclient.exe $(VP)/miscserver.exe $(VP)/sndtimer.exe $(VP)/sysinfd.exe $(VP)/regsv.exe $(VP)/sysinfd_win.exe $(VP)/pcap_test.exe $(VP)/joytest.exe $(VP)/icmpsnd.exe $(VP)/getver.exe $(VP)/dxshow.exe $(VP)/clip.exe $(VP)/readevt.exe $(VP)/midic.exe
5758
5859 all: $(TARGETS)
5960
@@ -210,6 +211,9 @@ $(VP)/mkindex.exe : mkindex.c
210211 $(VP)/netpf.exe : netpf.c
211212 $(CC) $? $(NOLOGO) -o $@ -DDOS
212213
214+$(VP)/netpf_send.exe : netpf_send.c
215+ $(CC) $? $(NOLOGO) -o $@ -DDOS
216+
213217 $(VP)/othello2.exe : othello2.c
214218 $(CC) $? $(NOLOGO) -o $@
215219
--- a/Makefile.win_vc6
+++ b/Makefile.win_vc6
@@ -50,11 +50,11 @@ TARGETS = $(VP)/age.exe $(VP)/cal.exe $(VP)/cgrep.exe $(VP)/csv2nocr.exe \
5050 $(VP)/perfan.exe $(VP)/strings2.exe $(VP)/t64an.exe $(VP)/tolower.exe \
5151 $(VP)/txt2vnt.exe $(VP)/wavana.exe $(VP)/wavcut2.exe \
5252 $(VP)/wavcut.exe $(VP)/which.exe $(VP)/xalloc.exe \
53- $(VP)/color2.exe
53+ $(VP)/color2.exe $(VP)/netpf.exe $(VP)/netpf_send.exe
5454
5555 # $(VP)/enews.exe $(VP)/slow.exe $(VP)/subdecode.exe $(VP)/tbl2csv.exe $(VP)/tcpdmpan.exe $(VP)/deltag.exe $(VP)/hexbin.exe $(VP)/iso2022.exe $(VP)/kita2.exe$ (VP)/othello2.exe $(VP)/upload.exe $(VP)/zusa.exe
5656
57-TARGETS_MS = $(VP)/cpuid.exe $(VP)/df.exe $(VP)/dgclient.exe $(VP)/dgserver.exe $(VP)/getip.exe $(VP)/lanck.exe $(VP)/midana.exe $(VP)/netpf.exe $(VP)/regsv.exe $(VP)/sendevt.exe $(VP)/shutdown.exe $(VP)/sysinfdsrv.exe $(VP)/sysinfd_win.exe $(VP)/sysperf.exe $(VP)/winmidisample.exe $(VP)/midiapi.exe $(VP)/play.exe $(VP)/joytest.exe $(VP)/icmpsnd.exe $(VP)/getver.exe $(VP)/getsysm.exe $(VP)/findwin.exe $(VP)/clip.exe $(VP)/midic.exe $(VP)/ctrain.exe
57+TARGETS_MS = $(VP)/cpuid.exe $(VP)/df.exe $(VP)/dgclient.exe $(VP)/dgserver.exe $(VP)/getip.exe $(VP)/lanck.exe $(VP)/midana.exe $(VP)/regsv.exe $(VP)/sendevt.exe $(VP)/shutdown.exe $(VP)/sysinfdsrv.exe $(VP)/sysinfd_win.exe $(VP)/sysperf.exe $(VP)/winmidisample.exe $(VP)/midiapi.exe $(VP)/play.exe $(VP)/joytest.exe $(VP)/icmpsnd.exe $(VP)/getver.exe $(VP)/getsysm.exe $(VP)/findwin.exe $(VP)/clip.exe $(VP)/midic.exe $(VP)/ctrain.exe
5858
5959 # $(VP)/ctrain.exe $(VP)/lsc.exe $(VP)/miscclient.exe $(VP)/miscserver.exe $(VP)/sndtimer.exe $(VP)/sysinfd.exe $(VP)/pcap_test.exe $(VP)/dxshow.exe $(VP)/readevt.exe
6060
@@ -216,6 +216,9 @@ $(VP)/mkindex.exe : mkindex.c
216216 $(VP)/netpf.exe : netpf.c
217217 $(CC) $? $(NOLOGO) -o $@ -DDOS wsock32.lib
218218
219+$(VP)/netpf_send.exe : netpf_send.c
220+ $(CC) $? $(NOLOGO) -o $@ -DDOS wsock32.lib
221+
219222 $(VP)/othello2.exe : othello2.c
220223 $(CC) $? $(NOLOGO) -o $@
221224
--- a/netpf_send.c
+++ b/netpf_send.c
@@ -1,12 +1,14 @@
11 /*
2- * netpf.c
2+ * netpf_send.c
33 *
4- * network性能測定
4+ * network性能測定 (send only.)
55 *
66 * 98/04/22 V1.00 by oga.
77 * 99/08/20 V1.01 add verbose mode
88 * 01/02/17 V1.011 GetSystemTime => GetLocalTime
99 * 03/06/07 V1.02 diff 0 対策
10+ * -------------------------------
11+ * 16/01/14 V1.03 netpf.c => netpf_send.c
1012 */
1113 #include <stdio.h>
1214 #include <stdlib.h>
@@ -35,7 +37,7 @@ void GET_DATA(int, char *, int);
3537 void reapchild();
3638 void memdump(FILE *, unsigned char *, int);
3739
38-int SEND_SIZE = (1024*1024*2);
40+int SEND_SIZE = (1024*1024*10); /* default: 2MB */
3941
4042 #ifdef DOS
4143 /*
@@ -70,10 +72,10 @@ char *b[];
7072
7173 for (i = 1; i<a; i++) {
7274 if (!strncmp(b[i],"-h",2)) {
73- printf("usage : netpf { -s | <hostname> } [-p <port(%d)>] [-c <send_size(KB)>\n",port);
75+ printf("usage : netpf_send { -s | <hostname> } [-p <port(%d)>] [-c <send_size(KB)>\n", port);
7476 printf(" -s : start as netpf server\n");
7577 printf(" hostnames : netpf server name.(start as netpf client)\n");
76- printf(" -c size : test data size(KB)\n");
78+ printf(" -c size : test data size(MB) default:%dMB\n", SEND_SIZE);
7779 printf(" -p port : test port\n");
7880 exit(1);
7981 }
@@ -87,7 +89,7 @@ char *b[];
8789 continue;
8890 }
8991 if (!strncmp(b[i],"-c",2)) {
90- SEND_SIZE = atoi(b[++i])*1024;
92+ SEND_SIZE = atoi(b[++i])*1024*1024;
9193 continue;
9294 }
9395 if (!strncmp(b[i],"-v",2)) {
@@ -176,12 +178,13 @@ char *b[];
176178 printf("accept %d pid=%d\n",con,getpid());
177179 /* サーバ処理 */
178180 for (i = 0; i<LOOP; i++) {
179- printf("## recv %d KB start\n",SEND_SIZE/1024);
181+ printf("## recv %d MB start\n",SEND_SIZE/1024/1024);
180182 GET_DATA(newsockfd, buf, SEND_SIZE);
181- printf("## send %d KB start\n",SEND_SIZE/1024);
182- PUT_DATA(newsockfd, buf, SEND_SIZE);
183+ //printf("## send %d KB start\n",SEND_SIZE/1024);
184+ //PUT_DATA(newsockfd, buf, SEND_SIZE);
183185 }
184186 printf("chile pid=%d exit!\n",getpid());
187+ close(newsockfd);
185188 #ifndef DOS
186189 exit(0);
187190 }
@@ -234,11 +237,12 @@ char *b[];
234237 exit(-1);
235238 }
236239 for (i = 0; i<LOOP; i++) {
237- printf("## send %d KB start\n",SEND_SIZE/1024);
240+ printf("## send %d MB start\n",SEND_SIZE/1024/1024);
238241 PUT_DATA(sockfd, buf, SEND_SIZE);
239- printf("## recv %d KB start\n",SEND_SIZE/1024);
240- GET_DATA(sockfd, buf, SEND_SIZE);
242+ //printf("## recv %d MB start\n",SEND_SIZE/1024/1024);
243+ //GET_DATA(sockfd, buf, SEND_SIZE);
241244 }
245+ //shutdown (sockfd, SHUT_RDWR);
242246 close(sockfd);
243247
244248 }