diff options
author | Timo Dritschler <timo.dritschler@kit.edu> | 2014-11-20 17:37:55 +0100 |
---|---|---|
committer | Timo Dritschler <timo.dritschler@kit.edu> | 2014-11-20 17:53:19 +0100 |
commit | 65c2326592b7b1496c468459689904843e443b26 (patch) | |
tree | 7dc907bc82227851bc8e13827ae25cbabcf9ba1f /test/test-client-bandwith.c | |
parent | e71b75575658c435bc77c01ef098336c563af740 (diff) | |
download | kiro-65c2326592b7b1496c468459689904843e443b26.tar.gz kiro-65c2326592b7b1496c468459689904843e443b26.tar.bz2 kiro-65c2326592b7b1496c468459689904843e443b26.tar.xz kiro-65c2326592b7b1496c468459689904843e443b26.zip |
Release KIRO to GitHub under LGPL v2.1
Added kiro_*_free methods to all three units
Added installation guide
Added readme
Added licence file
Diffstat (limited to 'test/test-client-bandwith.c')
-rw-r--r-- | test/test-client-bandwith.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/test/test-client-bandwith.c b/test/test-client-bandwith.c deleted file mode 100644 index c7f90ee..0000000 --- a/test/test-client-bandwith.c +++ /dev/null @@ -1,53 +0,0 @@ -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include "kiro-client.h" -#include "kiro-trb.h" -#include <assert.h> - - -int -main ( int argc, char *argv[] ) -{ - if (argc < 3) { - printf ("Not enough aruments. Usage: ./client <address> <port>\n"); - return -1; - } - - KiroClient *client = kiro_client_new (); - - if (-1 == kiro_client_connect (client, argv[1], argv[2])) { - g_object_unref (client); - return -1; - } - - kiro_client_sync (client); - KiroTrb *trb = kiro_trb_new (); - kiro_trb_adopt (trb, kiro_client_get_memory (client)); - - GTimer *timer = g_timer_new (); - - -while (1) { - int i = 0; - while(i < 500) { - kiro_client_sync (client); - i++; - } - - double elapsed = g_timer_elapsed (timer, NULL); - size_t size = kiro_client_get_memory_size (client); - printf ("Throughput: %.2fGbyte/s\n",((size * 500) / elapsed)/(1024*1024*1024)); -} - g_timer_stop (timer); - g_object_unref (client); - return 0; -} - - - - - - - - |