github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

melo / perl-examples

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 2
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Small examples, or proof of concepts — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Updated comparison between fast_stats.pl and stats_basic_optimized.pl 
melo (author)
Mon Oct 19 05:39:21 -0700 2009
commit  6faf812492610d6526580e21adf8b67a7651fd57
tree    4ed1137a9e608cdd6a523f7997cb7056b0efcb64
parent  d639f5b200618413eafee715058b0d4a5df83c24
perl-examples / nfsd_report_bench / build_source_file.pl nfsd_report_bench/build_source_file.pl
100755 35 lines (29 sloc) 1.608 kb
edit raw blame history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env perl
 
use strict;
use warnings;
 
my $size = shift || die "Usage: build_source_file.pl SIZE\n";
 
## read our sample
my $sample = do { undef $/; <DATA> };
 
print <<HEADER;
# Extent, type='Trace::NFS::common'
packet_at source source_port dest dest_port is_udp is_request nfs_version transaction_id op_id operation rpc_status payload_length record_id
HEADER
 
my $delta = length($sample);
while ($size > 0) {
  print $sample;
  $size -= $delta;
}
## 0 1 2 3 4 6 6 7 8 9 10 11 12 13
__DATA__
1253831523212739 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 3 lookup null 56 0
1253831523212743 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 3 lookup null 56 1
1253831523212746 3a163121 897 01c633c7 2049 TCP request V3 2eff9a5e 1 getattr null 36 2
1253831523212748 3a163121 897 01c633c7 2049 TCP request V3 2eff9a5e 1 getattr null 36 3
1253831523214877 2a2622c2 2049 1a264421 790 TCP response V3 2ffdae28 3 lookup 0 216 4
1253831523214886 2a2622c2 2049 1a264421 897 TCP response V3 2ffca15e 1 getattr 0 88 5
1253831523212739 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 7 lookup null 56 0
1253831523212743 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 7 lookup null 56 1
1253831523212746 3a163121 897 01c633c7 2049 TCP request V3 2eff9a5e 7 getattr null 36 2
1253831523212739 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 6 lookup null 56 0
1253831523212743 3a163121 790 01c633c7 2049 TCP request V3 21ff6e38 6 lookup null 56 1
1253831523212746 3a163121 897 01c633c7 2049 TCP request V3 2eff9a5e 6 getattr null 36 2
 
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server