- 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 ();
- {
- printf ("%s took %llu ms for %llu items\n",
- "Storing an item",
- (unsigned long long) (crc->end.abs_value - crc->start.abs_value),
- PUT_10);
- if (PUT_10 > 0)
- GAUGER (category,
- "Storing an item",
- (crc->end.abs_value - crc->start.abs_value) / PUT_10,
- "ms/item");
- }
- crc->i++;
- crc->start = GNUNET_TIME_absolute_get ();
- crc->phase++;
- GNUNET_SCHEDULER_add_now (&test, crc);
- break;
- case RP_REP_GET:
- crc->api->get_replication (crc->api->cls,
- &replication_get,
- crc);
- break;
- case RP_ZA_GET:
- crc->api->get_zero_anonymity (crc->api->cls,
- crc->offset++,
- 1,
- &iterate_zeros,
- crc);
- break;
- case RP_EXP_GET:
- crc->api->get_expiration (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");