/[Sack]/trunk/views/00.demo.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/views/00.demo.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30 - (show annotations)
Wed Sep 23 18:44:08 2009 UTC (14 years, 8 months ago) by dpavlin
File MIME type: text/plain
File size: 792 byte(s)
- added external B-tree using BerkeleyDB::Btree on /dev/shm for efficiat digest to integer
- version bump [0.02]
- cleanup output to always start with $port for easy overview
- display ticks every 1000 and 10000 records while processing view
- don't serialize output with Data::Dump, use Storable instead to save it on disk
- extracted info into sub

1
2 #$out->{ 'fields +' }->{$_}++ foreach keys %$rec;
3
4 #$out->{ 'years +' }->{ $rec->{PY}->[0] }++;
5
6 #$out->{ 'DT +' }->{ $_ }++ foreach @{ $rec->{DT} };
7
8 #$out->{'SC +'}->{ $_ }++ foreach @{ $rec->{SC} };
9
10 # FIXME out of memory without md5
11 #$out->{'C1 +'}->{ $_ }++ foreach @{ $rec->{C1} };
12 #$out->{'C1 +'}->{ digest($_) }++ foreach @{ $rec->{C1} };
13 $out->{'CR +'}->{ digest($_) }++ foreach @{ $rec->{CR} };
14
15 my $cr = 1;
16 my $nr = $out->{_debug}->{nr}++;
17 #$out->{'CR +'}->{ "$nr." . $cr++ }++ foreach @{ $rec->{CR} };
18
19 # XXX dump first record
20 #$out->{_debug_rec} ||= $rec;
21
22 #push @{ $out->{TI} }, $rec->{TI};
23
24 #push @{ $out->{_debug}->{id} }, $rec->{'000'};
25
26 $out->{'_debug'}->{records}++;
27 $out->{'_debug'}->{start_t} ||= time;
28 $out->{'_debug'}->{duration} = time - $out->{'_debug'}->{start_t};

  ViewVC Help
Powered by ViewVC 1.1.26