#!/usr/bin/perl
# $Id: scaletest,v 1.3 2001/08/10 22:23:20 mpashniak Exp $
# Copyright 2001 Sun Microsystems, Inc.  All rights reserved.

use lib qw( ../../client/perl );
use CCE;
use Time::HiRes qw ( gettimeofday tv_interval );
my $cce = new CCE;
if ($#ARGV >= 0) {
  $cce->connectuds($ARGV[0]);
} else {
  $cce->connectuds("cced.socket");
}

my $t= time();

my @dur = ();
for (my $i = 0; $i < 500; $i++) {
	my $t0 = [gettimeofday];
	$cce->create("Beta", { 'name' => $t . ".$i", "foo" => $i });
	my $d = tv_interval($t0, [gettimeofday]);
	print STDERR "$d\n";
	push (@dur, $d);
}


