Skip to content

Commit

Permalink
v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dkechag committed Aug 28, 2023
1 parent 3b02797 commit 9bbf172
Show file tree
Hide file tree
Showing 91 changed files with 24,454 additions and 542 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:

jobs:
linux:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
perl-version:
- '5.36'

container:
image: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- uses: actions/checkout@main
with:
submodules: recursive
- run: perl -V
- run: cpanm --notest --installdeps --verbose .
- run: perl Makefile.PL
- run: make
- run: prove -wlvmb t
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
data/*.html
data/*.seq
data/t/
.DS_Store
nytprof*
cover_db*
.vstags
/.vscode/
/.idea/
9 changes: 9 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Revision history for Benchmark-DKbench

2.0 2023-08-28
Rewritten with more benchmarks and multi-threading.
First CPAN release.

1.0 2021-12-21
First version.

78 changes: 78 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
Changes
data/t/attributes/accessor_context.t
data/t/attributes/accessor_inlining.t
data/t/attributes/accessor_override_method.t
data/t/attributes/accessor_overwrite_warning.t
data/t/attributes/attr_dereference_test.t
data/t/attributes/attribute_accessor_generation.t
data/t/attributes/attribute_custom_metaclass.t
data/t/attributes/attribute_delegation.t
data/t/attributes/attribute_does.t
data/t/attributes/attribute_inherited_slot_specs.t
data/t/attributes/attribute_lazy_initializer.t
data/t/attributes/attribute_names.t
data/t/attributes/attribute_reader_generation.t
data/t/attributes/attribute_required.t
data/t/attributes/attribute_traits_n_meta.t
data/t/attributes/attribute_traits_parameterized.t
data/t/attributes/attribute_traits_registered.t
data/t/attributes/attribute_traits.t
data/t/attributes/attribute_triggers.t
data/t/attributes/attribute_type_unions.t
data/t/attributes/attribute_without_any_methods.t
data/t/attributes/attribute_writer_generation.t
data/t/attributes/bad_coerce.t
data/t/attributes/chained_coercion.t
data/t/attributes/clone_weak.t
data/t/attributes/default_class_role_types.t
data/t/attributes/default_undef.t
data/t/attributes/delegation_and_modifiers.t
data/t/attributes/delegation_arg_aliasing.t
data/t/attributes/delegation_target_not_loaded.t
data/t/attributes/illegal_options_for_inheritance.t
data/t/attributes/inherit_lazy_build.t
data/t/attributes/lazy_no_default.t
data/t/attributes/method_generation_rules.t
data/t/attributes/misc_attribute_coerce_lazy.t
data/t/attributes/misc_attribute_tests.t
data/t/attributes/more_attr_delegation.t
data/t/attributes/no_init_arg.t
data/t/attributes/no_slot_access.t
data/t/attributes/non_alpha_attr_names.t
data/t/attributes/numeric_defaults.t
data/t/attributes/trigger_and_coerce.t
data/t/attributes/type_constraint.t
data/t/recipes/basics_bankaccount_methodmodifiersandsubclassing.t
data/t/recipes/basics_binarytree_attributefeatures.t
data/t/recipes/basics_company_subtypes.t
data/t/recipes/basics_datetime_extendingnonmooseparent.t
data/t/recipes/basics_document_augmentandinner.t
data/t/recipes/basics_http_subtypesandcoercion.t
data/t/recipes/basics_point_attributesandsubclassing.t
data/t/recipes/extending_debugging_baseclassrole.t
data/t/recipes/extending_mooseish_moosesugar.t
data/t/recipes/legacy_debugging_baseclassreplacement.t
data/t/recipes/legacy_labeled_attributemetaclass.t
data/t/recipes/meta_globref_instancemetaclass.t
data/t/recipes/meta_labeled_attributetrait.t
data/t/recipes/meta_privateorpublic_methodmetaclass.t
data/t/recipes/meta_table_metaclasstrait.t
data/t/recipes/roles_applicationtoinstance.t
data/t/recipes/roles_comparable_codereuse.t
data/t/recipes/roles_restartable_advancedcomposition.t
data/M31.jpg
data/wiki0.html
data/wiki1.html
data/wiki2.html
dkbench
lib/Benchmark/DKbench.pm
lib/Benchmark/DKbench/Setup.pm
Makefile.PL
MANIFEST This list of files
README
setup_dkbench
t/00-load.t
t/cover.t
t/simple.t
xt/author/manifest.t
xt/author/pod.t
30 changes: 30 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Top-level filter (only include the following...)
^(?!(?:script|examples|lib|inc|t|xt|data)/|(?:(?:Makefile|Build)\.PL|README|LICENSE|MANIFEST|Changes|META\.(?:yml|json))$)

# Avoid version control files.
\bRCS\b
\bCVS\b
,v$
\B\.svn\b
\b_darcs\b
# (.git or .hg only in top-level, hence it's blocked above)

# Avoid temp and backup files.
~$
\.tmp$
\.old$
\.bak$
\..*?\.sw[po]$
\#$
\b\.#

# avoid OS X finder files
\.DS_Store$

# ditto for Windows
\bdesktop\.ini$
\b[Tt]humbs\.db$

# Avoid patch remnants
\.orig$
\.rej$
85 changes: 85 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
use 5.006;
use strict;
use warnings;
use ExtUtils::MakeMaker;
use File::ShareDir::Install;

install_share dist => 'data';

my %WriteMakefileArgs = (
NAME => 'Benchmark::DKbench',
AUTHOR => q{Dimitrios Kechagias <[email protected]>},
VERSION_FROM => 'lib/Benchmark/DKbench.pm',
ABSTRACT_FROM => 'lib/Benchmark/DKbench.pm',
LICENSE => 'perl_5',
MIN_PERL_VERSION => '5.12.0',
CONFIGURE_REQUIRES => {
"ExtUtils::MakeMaker" => '6.52',
"File::ShareDir::Install" => 0,
},
EXE_FILES => ["dkbench", "setup_dkbench"],
TEST_REQUIRES => {
'Test2::Tools::Exception' => '0',
'Test2::V0' => '0',
},
PREREQ_PM => {
'Astro::Coord::Constellations' => '0',
'Astro::Coord::Precession' => '0',
'Crypt::JWT' => '0.032',
'CSS::Inliner' => '0',
'DateTime' => '0',
'File::ShareDir' => '0',
'HTML::FormatText' => '0',
'HTML::TreeBuilder' => '0',
'Imager' => '1',
'Imager::File::JPEG' => '0',
'Image::PHash' => '0.3',
'JSON::XS' => '0',
'Math::MatrixReal' => '0',
'Math::DCT' => '0',
'Moose' => '0',
'MCE::Loop' => '0',
'Sys::Info' => '0',
'Test::Harness' => '0',
'Test::Output' => '0',
'Test::Requires' => '0',
},
dist => {
COMPRESS => 'gzip -9f',
SUFFIX => 'gz',
},
META_MERGE => {
"meta-spec" => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'git://github.com/dkechag/Benchmark-DKbench.git',
web => 'https://github.com/dkechag/Benchmark-DKbench',
},
},
},
clean => {FILES => 'Benchmark-DKbench-*'},
);

# Compatibility with old versions of ExtUtils::MakeMaker
unless (eval { ExtUtils::MakeMaker->VERSION('6.64'); 1 }) {
my $test_requires = delete $WriteMakefileArgs{TEST_REQUIRES} || {};
@{$WriteMakefileArgs{PREREQ_PM}}{keys %$test_requires} = values %$test_requires;
}

unless (eval { ExtUtils::MakeMaker->VERSION('6.55_03'); 1 }) {
my $build_requires = delete $WriteMakefileArgs{BUILD_REQUIRES} || {};
@{$WriteMakefileArgs{PREREQ_PM}}{keys %$build_requires} = values %$build_requires;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION('6.52'); 1 };
delete $WriteMakefileArgs{MIN_PERL_VERSION}
unless eval { ExtUtils::MakeMaker->VERSION('6.48'); 1 };
delete $WriteMakefileArgs{LICENSE}
unless eval { ExtUtils::MakeMaker->VERSION('6.31'); 1 };

WriteMakefile(%WriteMakefileArgs);

package MY;
use File::ShareDir::Install 'postamble';
39 changes: 39 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Benchmark-DKbench

Benchmark::DKbench - Fast perceptual image hashing (DCT-based pHash)

INSTALLATION

Normally you would expect to use a package manager like cpanm to install as:

cpanm Benchmark::DKbench

To install this module manually, run the following commands:

perl Makefile.PL
make
make test
make install

This, however requires certain CPAN modules and libraries (e.g. dev versions of
libjpeg, libdb) to be installed. See setup_dkbench for more details.

SUPPORT AND DOCUMENTATION

CPAN:
https://metacpan.org/release/Benchmark-DKbench

After installing, you can find documentation for this module with the
perldoc command:

perldoc Benchmark::DKbench

Source code and issues on GitHub:
https://github.com/dkechag/Benchmark-DKbench

LICENSE AND COPYRIGHT

This software is copyright (c) 2021-2023, Dimitrios Kechagias.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Loading

0 comments on commit 9bbf172

Please sign in to comment.