Group
Extension

Matches 3

Benchmark-Serialize ( P/PM/PMAKHOLM/Benchmark-Serialize-0.08.tar.gz, PMAKHOLM, 2010; MetaCPAN )
Benchmark-Serialize/lib/Benchmark/Serialize.pm ( view source; MetaCPAN )
  => { 'a' .. 'z' },
        string => 'x' x 200,
    };

    cmpthese( -5, $structure, qw(:core :json :yaml) );

=head1 DESCRIPTION

This module encapsulates some basic benchmarks to help you choose 
 name attribute:

  {
      name    => 'JSON::XS',
      deflate => sub { JSON::XS::encode_json($_[0]) }
      inflate => inflate  => sub { JSON::XS::decode_json($_[0]) }
  }

By default Benchmark::Se
et of serialization modules

=item :core    - Serialization modules included in core

=item :json    - JSON modules

=item :yaml    - YAML modules

=item :xml     - XML formats

=back

=cut

use Bench
Benchmark-Serialize ( P/PM/PMAKHOLM/Benchmark-Serialize-0.08.tar.gz, PMAKHOLM, 2010; MetaCPAN )
Benchmark-Serialize/lib/Benchmark/Serialize/Library/Data/Serializer.pm ( view source; MetaCPAN )
ark::Serializer::Library::Data::Serializer qw(JSON);

    # Register tests on run time
    Benchmark::Serializer::Library::Data::Serializer->register('JSON');
    

=head1 DESCRIPTION

This modules ad
ags

For each added serializer a new Benchmark tag is created called
C<:DS-<nameE<gt>>, i.e C<:DS-JSON> if used as in the synopsis

=cut 

sub import {
    my $pkg     = shift;
    my @imports = map {
Benchmark-Serialize ( P/PM/PMAKHOLM/Benchmark-Serialize-0.08.tar.gz, PMAKHOLM, 2010; MetaCPAN )
Benchmark-Serialize/lib/Benchmark/Serialize/Library.pm ( view source; MetaCPAN )
,
    'JSON::PP' => {
        deflate  => sub { JSON::PP::encode_json($_[0])           },
        inflate  => sub { JSON::PP::decode_json($_[0])           },
        default  => 1,
        json     =>
,
    'JSON::XS' => {
        deflate  => sub { JSON::XS::encode_json($_[0])           },
        inflate  => sub { JSON::XS::decode_json($_[0])           },
        default  => 1,
        json     =>
 1
    },
    'JSON::XS,pretty' => {
        deflate  => sub { $_[1]->encode( $_[0] ) },
        inflate  => sub { $_[1]->decode( $_[0] ) },
        args     => sub { JSON::XS->new->pretty(1)->allow_b

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.