]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Modifikace souboru pro genrovani grafu: generovani .eps formatu
authorMartin Molnar <molnar@sum.(none)>
Tue, 27 Nov 2007 16:07:57 +0000 (17:07 +0100)
committerMartin Molnar <molnar@sum.(none)>
Tue, 27 Nov 2007 16:07:57 +0000 (17:07 +0100)
wme_test/plot_commands
wme_test/wclient.c

index 2402546600bf67abf4808aacaad52bb04aacaf65..ca6787262c29a779d9b095d9e7ca9af4f40bc4cc 100644 (file)
@@ -1,11 +1,8 @@
-#set term post eps
-#set output 'test.eps'
-set term x11
+set term postscript color
+set output 'delay_stats.eps'
+#set term x11
 set title "TITLE"
 set xlabel "Delay (ms)"
 set ylabel "Count"
 set key right top nobox
-plot [0:*] [0:*] "delay_stats.dat" index 0 smooth csplines title "VI"
-replot "delay_stats.dat" index 1 smooth csplines title "VO"
-replot "delay_stats.dat" index 2 smooth csplines title "BE"
-replot "delay_stats.dat" index 3 smooth csplines title "BK"
+plot [0:*] [0:*] "delay_stats.dat" index 0 smooth csplines title "VO","delay_stats.dat" index 1 smooth csplines title "VI", "delay_stats.dat" index 2 smooth csplines title "BE", "delay_stats.dat" index 3 smooth csplines title "BK"
index e2887fa789dbfb9a30d699cc5810580427d3fcc2..2876c64cb9687188b435e987fb4626dfa31b13ca 100644 (file)
@@ -56,12 +56,12 @@ struct msg_t {
 
 unsigned short int delay_stats[AC_QUEUES][MAX_DELAY/GRANULARITY];
 
-struct ac_stats {
+/*struct ac_stats[AC_QUEUES] {
    unsigned long int min_trans_time;
    unsigned long int sum_trans_time;
    struct timespec   recv_timestamp;
    struct timespec   send_timestamp; 
-};
+};*/
 
 struct send_endpoint {
        int ac;
@@ -70,15 +70,19 @@ struct send_endpoint {
 };
 
 #define MSEC (1000*1000)
-#define MBIT (1000*1000)
-#define KBIT 1000
+#define Mbit (1000*1000)
+#define Kbit 1000
 
 
-struct send_endpoint epoint[] = {
-       { .ac = AC_VO, .period_nsec=20*MSEC, .bandwidth_bps = 32*KBIT },
-/*     { .ac = AC_VI, .period_nsec=20*MSEC, .bandwidth_bps =  1*MBIT }, */
+struct send_endpoint sepoint[] = {
+       { .ac = AC_VO, .period_nsec=200*MSEC, .bandwidth_bps = 34*Kbit },
+       { .ac = AC_VI, .period_nsec=25*MSEC, .bandwidth_bps =  480*Kbit },
+       { .ac = AC_BE, .period_nsec=40*MSEC, .bandwidth_bps =  300*Kbit },
+       { .ac = AC_BK, .period_nsec=40*MSEC, .bandwidth_bps =  300*Kbit },
+//     { .ac = AC_VI, .period_nsec=17*MSEC, .bandwidth_bps =  675*Kbit },
 };
-unsigned int nr_epoints = sizeof(epoint)/sizeof(*epoint);
+
+unsigned int nr_sepoints = sizeof(sepoint)/sizeof(*sepoint);
 
 void stopper()
 {
@@ -188,11 +192,11 @@ void* receiver(void* queue)
        
                /*if (trans_time_nsec < min_trans_time) 
                        min_trans_time = trans_time_nsec;*/
-               printf("seqn= %lu tos= %d start= %lu(s).%lu(ns)"\
+               /*printf("seqn= %lu tos= %d start= %lu(s).%lu(ns)"\
                         "stop= %lu(s).%lu(ns)\n trans_time = %lums\n",\
                         msg.seqn, msg.tos, send_timestamp.tv_sec,\
                         send_timestamp.tv_nsec,recv_timestamp.tv_sec,\
-                        recv_timestamp.tv_nsec, trans_time_msec); 
+                        recv_timestamp.tv_nsec, trans_time_msec); */
        }
 }
 
@@ -289,22 +293,6 @@ int main(int argc, char *argv[])
        sendpoints.epoint[AC_VO].period_nsec = 300000;
        */
                
-       /*sendpoints.epoint[AC_BE].ac = AC_BE;
-       sendpoints.epoint[AC_BE].period_nsec = 760000;
-
-       sendpoints.epoint[AC_BK].ac = AC_BK;
-       sendpoints.epoint[AC_BK].period_nsec = 757000;
-       
-       sendpoints.epoint[AC_VI].ac = AC_VI;
-       sendpoints.epoint[AC_VI].period_nsec = 9908000;
-       
-       sendpoints.epoint[AC_VO].ac = AC_VO;
-       sendpoints.epoint[AC_VO].period_nsec = 90000000;
-       */
-
-       epoint[0].ac = AC_BE;
-       epoint[0].period_nsec = 1000000;
-/*     sendpoints.nr_epoints = 1; */
 
        if (signal(SIGTERM, stopper) == SIG_ERR) {
                perror("Error in signal registration");
@@ -327,8 +315,8 @@ int main(int argc, char *argv[])
        }               
                        
        /* create sendpoints */
-       for (i = 0; i < nr_epoints; i++) {
-               rc = pthread_create(&thread, &attr, sender, (void*) &epoint[i]);
+       for (i = 0; i < nr_sepoints; i++) {
+               rc = pthread_create(&thread, &attr, sender, (void*) &sepoint[i]);
                if (rc) {
                        printf("Error while creating sender %d\n",rc);
                        return 1;