11
|
1 #!/usr/bin/perl -w
|
18
|
2 use strict;
|
36
|
3 use lib '..\Lib';
|
11
|
4
|
36
|
5 require IMPL::DOM::Navigator::SimpleBuilder;
|
11
|
6
|
36
|
7 my $builder = IMPL::DOM::Navigator::SimpleBuilder->new();
|
|
8
|
|
9 use Time::HiRes qw(gettimeofday tv_interval);
|
|
10
|
|
11 my $t = [gettimeofday];
|
|
12
|
|
13 $builder->NavigateCreate('personInfo', version => '1');
|
|
14 $builder->NavigateCreate('firstName')->nodeValue('Nemo');
|
|
15 $builder->Back();
|
|
16 $builder->NavigateCreate('lastName')->nodeValue('Nobel');
|
|
17 $builder->Back();
|
|
18 $builder->NavigateCreate('lastName')->nodeValue('Gardum');
|
|
19 $builder->Back();
|
|
20 for(1..10000) {
|
|
21 $builder->NavigateCreate('address', local => 1);
|
|
22 $builder->NavigateCreate('street')->nodeValue('Hellroad');
|
|
23 $builder->Back();
|
|
24 $builder->NavigateCreate('line')->nodeValue($_);
|
|
25 $builder->Back();
|
|
26 $builder->Back();
|
|
27 }
|
|
28 $builder->Back();
|
|
29
|
|
30 print "Build: ",tv_interval($t,[gettimeofday]),"\n"; |