mincore 0.0.9.2 → 0.0.9.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +1 -1
- data/Gemfile +2 -1
- data/README.md +2 -0
- data/bin/cachestats.rb +17 -0
- data/lib/mincore.rb +2 -2
- data/mincore.gemspec +2 -2
- data/test/test_helper.rb +5 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77d416b36e7f07f9c96c528575cef9f0741f8ecf
|
4
|
+
data.tar.gz: 9e8a6397e7ffdfe40ada2bbad0b19eec97a0cb97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c19ab3259fe46c4ad68b66cf522c4fffb02c1171daf00c21067babf595b15f54dacb16edd5d974a5eafa2e263526b27fa0bf2915de72c0a3e030ec44562873a1
|
7
|
+
data.tar.gz: 786a6c28145ebc3a09d8725135218040ef3081a5102a26d95b92146d50d26c3e879f7b02343a9a076fcb97b5ef23d04c7868d1f0b7f922d2dab688f2e85a71f1
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -7,6 +7,8 @@ ruby-mincore - Ruby bindings for Linux cache manipulation
|
|
7
7
|
[![Code Climate](https://codeclimate.com/github/noushi/ruby-mincore.png)](https://codeclimate.com/github/noushi/ruby-mincore)
|
8
8
|
|
|
9
9
|
[![Dependency Status](https://gemnasium.com/noushi/ruby-mincore.png)](https://gemnasium.com/noushi/ruby-mincore)
|
10
|
+
|
|
11
|
+
[![Coverage Status](https://coveralls.io/repos/noushi/ruby-mincore/badge.png)](https://coveralls.io/r/noushi/ruby-mincore)
|
10
12
|
|
11
13
|
`mincore` provides Ruby bindings for Linux cache manipulation, including cache inspection and deletion for a specific file.
|
12
14
|
|
data/bin/cachestats.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Simple script to view the cached'ness of a (single) file.
|
3
|
+
|
4
|
+
require 'mincore'
|
5
|
+
|
6
|
+
filename=ARGV[0]
|
7
|
+
|
8
|
+
retcode, pieces = File.mincore(filename)
|
9
|
+
|
10
|
+
cached=0
|
11
|
+
pieces.each do |e|
|
12
|
+
cached += 1 if e
|
13
|
+
end
|
14
|
+
|
15
|
+
puts "#{cached}/#{pieces.size}"
|
16
|
+
|
17
|
+
|
data/lib/mincore.rb
CHANGED
@@ -88,8 +88,8 @@ static VALUE _mincore(char *filename) {
|
|
88
88
|
|
89
89
|
pageinfo_arr = rb_ary_new2(pages);
|
90
90
|
for(i=0; i<pages; i++) {
|
91
|
-
|
92
|
-
VALUE status = Qtrue;
|
91
|
+
VALUE status = ((pageinfo[i] & 1)?Qtrue:Qfalse);
|
92
|
+
// VALUE status = Qtrue;
|
93
93
|
rb_ary_push(pageinfo_arr, status);
|
94
94
|
}
|
95
95
|
|
data/mincore.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'mincore'
|
3
|
-
s.version = '0.0.9.
|
4
|
-
s.date = '2013-11-
|
3
|
+
s.version = '0.0.9.3.pre'
|
4
|
+
s.date = '2013-11-19'
|
5
5
|
|
6
6
|
s.homepage = 'http://github.com/noushi/ruby-mincore'
|
7
7
|
s.summary = "Ruby bindings for Linux cache manipulation"
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mincore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.9.
|
4
|
+
version: 0.0.9.3.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reda NOUSHI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: RubyInline
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- README.md
|
53
53
|
- Rakefile
|
54
54
|
- TODO
|
55
|
+
- bin/cachestats.rb
|
55
56
|
- bin/ci/before_build.sh
|
56
57
|
- lib/mincore.rb
|
57
58
|
- mincore.gemspec
|
@@ -73,9 +74,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
74
|
version: '0'
|
74
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
76
|
requirements:
|
76
|
-
- - '
|
77
|
+
- - '>'
|
77
78
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
79
|
+
version: 1.3.1
|
79
80
|
requirements: []
|
80
81
|
rubyforge_project:
|
81
82
|
rubygems_version: 2.1.10
|