nl-fast_png 0.0.0.pre.usegit → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64d8014055d54b9e7940be354f9e63af3185212a13b1b3063d181068531730e0
4
- data.tar.gz: 7004e22bbd82073df23f0b66776c410ef0675b62460769ffdd6d364d9a7a8a15
3
+ metadata.gz: a664f29a95a13c1a1ef044bf45275359d44cb7e16104962b5b4d807ae2350c8e
4
+ data.tar.gz: 1ce7b4c9f10da315e2841e619a6e498774ed71df008b3104143636c27c643ef4
5
5
  SHA512:
6
- metadata.gz: 610ba7f0b0c7930a2808e6256221a26ea1355623cb32ddeae797c1c820ef5a82ced924f21b2f1d042bef5b1ac6d961dce3047cd4cc068bf12c8e96c89cb32d4e
7
- data.tar.gz: bb52db8b67c2c2b32c2fd701f7c331d5055433839d5889665507ab78f6f23844fcd6d10845df65b77e839c129bcee16ff66cad7c19eef96f8e35a2212d08afd9
6
+ metadata.gz: dce949b32465706dece2e020664125a3c38f4f50e678a21548741565f40d513164c32c1c1c3321fbb7fa1113cee96127c54037cc3dbdbc6d62a01167b0843ce7
7
+ data.tar.gz: a1e7749d4a4fd39d6c640959cd952e32deb10712bca926e335d822f0a38b1c84d52d2f9952303450ed9ca6cebee35af4f5bfd4da64c04904e78a0229c7ec0cc4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nl-fast_png (0.0.0.pre.usegit)
4
+ nl-fast_png (0.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # NL::FastPNG
1
+ # NL::FastPng
2
2
 
3
3
  NL::FastPng is a C-based extension that uses libpng in a simplified
4
- configuration for faster performance on black and white images, at the expense
4
+ configuration for faster performance on grayscale images, at the expense
5
5
  of slightly larger file sizes.
6
6
 
7
7
  This code was used by the Nitrogen Logic Depth Camera Controller to generate
@@ -17,16 +17,14 @@ details. NL::FastPng is © 2011-2020, Mike Bourgeous.
17
17
  Add this line to your application's Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'nl-fast_png'
20
+ gem 'nl-fast_png', git: 'git@github.com:nitrogenlogic/nl-fast_png.git'
21
21
  ```
22
22
 
23
23
  And then execute:
24
24
 
25
- $ bundle install
26
-
27
- Or install it yourself as:
28
-
29
- $ gem install nl-fast_png
25
+ ```bash
26
+ $ bundle install
27
+ ```
30
28
 
31
29
  ## Usage
32
30
 
data/bin/benchmark.rb ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+
6
+ require 'benchmark'
7
+
8
+ require 'nl/fast_png'
9
+
10
+ THREADS=ENV['THREADS']&.to_i || 8
11
+ COUNT=ENV['COUNT']&.to_i || 1000
12
+
13
+ elapsed = Benchmark.realtime do
14
+ threads = THREADS.times.map {
15
+ Thread.new do
16
+ data = 256.times.map(&:chr).join * 1024
17
+ COUNT.times do
18
+ NL::FastPng.store_png(512, 512, 8, data)
19
+ end
20
+ end
21
+ }
22
+
23
+ threads.each(&:join)
24
+ end
25
+
26
+ puts "Elapsed: #{elapsed} seconds"
27
+ puts "Speed: #{(THREADS * COUNT) / elapsed} per second"
@@ -1,5 +1,5 @@
1
1
  module NL
2
2
  module FastPng
3
- VERSION = "0.0.0-usegit"
3
+ VERSION = "0.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nl-fast_png
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre.usegit
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bourgeous
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-28 00:00:00.000000000 Z
11
+ date: 2021-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -52,6 +52,7 @@ files:
52
52
  - LICENSE
53
53
  - README.md
54
54
  - Rakefile
55
+ - bin/benchmark.rb
55
56
  - bin/console
56
57
  - bin/setup
57
58
  - ext/nl-fast_png/extconf.rb
@@ -75,9 +76,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
76
  version: 2.3.0
76
77
  required_rubygems_version: !ruby/object:Gem::Requirement
77
78
  requirements:
78
- - - ">"
79
+ - - ">="
79
80
  - !ruby/object:Gem::Version
80
- version: 1.3.1
81
+ version: '0'
81
82
  requirements: []
82
83
  rubygems_version: 3.1.4
83
84
  signing_key: