[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15643 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15643 - gnunet/src/transport |
Date: |
Wed, 15 Jun 2011 18:05:26 +0200 |
Author: wachs
Date: 2011-06-15 18:05:26 +0200 (Wed, 15 Jun 2011)
New Revision: 15643
Modified:
gnunet/src/transport/perf_transport_ats.c
Log:
improvements
Modified: gnunet/src/transport/perf_transport_ats.c
===================================================================
--- gnunet/src/transport/perf_transport_ats.c 2011-06-15 13:12:06 UTC (rev
15642)
+++ gnunet/src/transport/perf_transport_ats.c 2011-06-15 16:05:26 UTC (rev
15643)
@@ -47,6 +47,7 @@
static struct GNUNET_TIME_Absolute start;
static struct GNUNET_TIME_Absolute end;
+static int ret = 0;
void solve_mlp(int presolve)
{
@@ -108,9 +109,17 @@
void bench_simplex_optimization(char * file, int executions)
{
int c;
+ int res;
prob = glp_create_prob();
- glp_read_lp(prob, NULL, file);
+ res = glp_read_lp(prob, NULL, file);
+ if (res != 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Problem file `%s' not found\n", file);
+ ret = 1;
+ return;
+ }
solve_lp(GNUNET_YES);
@@ -134,9 +143,17 @@
void bench_simplex_no_optimization(char * file, int executions)
{
int c;
+ int res;
prob = glp_create_prob();
- glp_read_lp(prob, NULL, file);
+ res = glp_read_lp(prob, NULL, file);
+ if (res != 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Problem file `%s' not found\n", file);
+ ret = 1;
+ return;
+ }
for (c=0; c<executions;c++)
{
@@ -158,10 +175,17 @@
void bench_mlp_no_optimization(char * file, int executions)
{
int c;
+ int res;
prob = glp_create_prob();
- glp_read_lp(prob, NULL, file);
-
+ res = glp_read_lp(prob, NULL, file);
+ if (res != 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Problem file `%s' not found\n", file);
+ ret = 1;
+ return;
+ }
for (c=0; c<executions;c++)
{
start = GNUNET_TIME_absolute_get();
@@ -184,8 +208,17 @@
void bench_mlp_with_optimization(char * file, int executions, int changes)
{
int c;
+ int res;
+
prob = glp_create_prob();
- glp_read_lp(prob, NULL, file);
+ res = glp_read_lp(prob, NULL, file);
+ if (res != 0)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Problem file `%s' not found\n", file);
+ ret = 1;
+ return;
+ }
solve_lp(GNUNET_YES);
@@ -236,7 +269,7 @@
int main (int argc, char *argv[])
{
- int ret = 0;
+
GNUNET_log_setup ("perf-transport-ats",
#if VERBOSE
"DEBUG",
@@ -268,27 +301,30 @@
bench_mlp_no_optimization (file, executions);
bench_mlp_with_optimization (file, executions, 0);
+ if (ret != 0)
+ return ret;
+
// -> 400 addresses
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Simplex, no optimization, average per address: %f\n",
((double) sim_no_opt_avg / EXECS) / 400);
GAUGER ("TRANSPORT","GLPK simplex no optimization",
((double) sim_no_opt_avg / EXECS) / 400, "ms/address");
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Simplex, with optimization, average per address: %f\n",
((double) sim_with_opt_avg / EXECS) / 400);
GAUGER ("TRANSPORT",
"GLPK simplex, 100 peers 400 addresses with optimization",
((double) sim_with_opt_avg / EXECS) / 400, "ms/address");
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"MLP no optimization average per address: %f\n",
((double) mlp_no_opt_avg / EXECS) / 400);
GAUGER ("TRANSPORT","GLPK MLP 100 peers 400 addresses no optimization",
((double) mlp_no_opt_avg / EXECS) / 400, "ms/address");
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"MLP optimization average per address: %f\n",
((double) mlp_with_opt_avg/ EXECS) / 400);
GAUGER ("TRANSPORT",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15643 - gnunet/src/transport,
gnunet <=