- case RP_ERROR:
- GNUNET_break (0);
- crc->api->drop (crc->api->cls);
- ok = 1;
- GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
- &cleaning_task, crc);
- break;
- case RP_PUT:
- crc->start = GNUNET_TIME_absolute_get ();
- for (j=0;j<PUT_10;j++)
- putValue (crc->api, j, crc->i);
- crc->end = GNUNET_TIME_absolute_get ();
- {
- char buf[256];
-
- GNUNET_snprintf (buf, sizeof (buf),
- "Execution of %u PUT requests",
- PUT_10);
- printf ("%s took %llu ms\n",
- buf,
- (unsigned long long) (crc->end.abs_value - crc->start.abs_value));
- GAUGER (category,
- buf, crc->end.abs_value - crc->start.abs_value, "ms");
- }
- crc->i++;
- crc->start = GNUNET_TIME_absolute_get ();
- crc->phase++;
- GNUNET_SCHEDULER_add_now (&test, crc);
- break;
- case RP_REP_GET:
- crc->api->replication_get (crc->api->cls,
- &replication_get,
- crc);
- break;
- case RP_ZA_GET:
- crc->api->iter_zero_anonymity (crc->api->cls, 1,
- &iterate_zeros,
- crc);
- break;
- case RP_EXP_GET:
- crc->api->expiration_get (crc->api->cls,
- &expiration_get,
- crc);
- break;
- case RP_DONE:
- exit (0);
- crc->api->drop (crc->api->cls);
- ok = 0;
- GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
- &cleaning_task, crc);
- break;
+ printf ("%s took %s for %llu items\n", "Storing an item",
+ GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_difference (crc->start,
+ crc->end),
+ GNUNET_YES),
+ PUT_10);
+ if (PUT_10 > 0)
+ GAUGER (category, "Storing an item",
+ (crc->end.abs_value_us - crc->start.abs_value_us) / 1000LL / PUT_10,
+ "ms/item");