hitimes 1.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +69 -0
- data/LICENSE +13 -0
- data/README +134 -0
- data/Rakefile +66 -0
- data/examples/benchmarks.rb +113 -0
- data/examples/stats.rb +31 -0
- data/ext/hitimes/extconf.rb +17 -0
- data/ext/hitimes/hitimes_ext.c +21 -0
- data/ext/hitimes/hitimes_instant_clock_gettime.c +28 -0
- data/ext/hitimes/hitimes_instant_osx.c +16 -0
- data/ext/hitimes/hitimes_instant_windows.c +27 -0
- data/ext/hitimes/hitimes_interval.c +362 -0
- data/ext/hitimes/hitimes_interval.h +73 -0
- data/ext/hitimes/hitimes_stats.c +269 -0
- data/ext/hitimes/hitimes_stats.h +30 -0
- data/ext/java/src/hitimes/Hitimes.java +54 -0
- data/ext/java/src/hitimes/HitimesInterval.java +174 -0
- data/ext/java/src/hitimes/HitimesService.java +16 -0
- data/ext/java/src/hitimes/HitimesStats.java +112 -0
- data/gemspec.rb +65 -0
- data/lib/hitimes.rb +37 -0
- data/lib/hitimes/hitimes.jar +0 -0
- data/lib/hitimes/metric.rb +118 -0
- data/lib/hitimes/mutexed_stats.rb +32 -0
- data/lib/hitimes/paths.rb +53 -0
- data/lib/hitimes/stats.rb +58 -0
- data/lib/hitimes/timed_metric.rb +176 -0
- data/lib/hitimes/timed_value_metric.rb +233 -0
- data/lib/hitimes/value_metric.rb +71 -0
- data/lib/hitimes/version.rb +57 -0
- data/spec/interval_spec.rb +133 -0
- data/spec/metric_spec.rb +30 -0
- data/spec/mutex_stats_spec.rb +34 -0
- data/spec/paths_spec.rb +13 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/stats_spec.rb +100 -0
- data/spec/timed_metric_spec.rb +155 -0
- data/spec/timed_value_metric_spec.rb +172 -0
- data/spec/value_metric_spec.rb +110 -0
- data/spec/version_spec.rb +33 -0
- data/tasks/announce.rake +42 -0
- data/tasks/config.rb +109 -0
- data/tasks/distribution.rake +93 -0
- data/tasks/documentation.rake +32 -0
- data/tasks/extension.rake +108 -0
- data/tasks/rspec.rake +33 -0
- data/tasks/rubyforge.rake +55 -0
- data/tasks/utils.rb +80 -0
- metadata +191 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'tasks/config'
|
2
|
+
|
3
|
+
#-------------------------------------------------------------------------------
|
4
|
+
# Distribution and Packaging
|
5
|
+
#-------------------------------------------------------------------------------
|
6
|
+
if pkg_config = Configuration.for_if_exist?("packaging") then
|
7
|
+
|
8
|
+
require 'gemspec'
|
9
|
+
require 'rake/gempackagetask'
|
10
|
+
require 'rake/contrib/sshpublisher'
|
11
|
+
|
12
|
+
namespace :dist do
|
13
|
+
|
14
|
+
Rake::GemPackageTask.new(Hitimes::GEM_SPEC) do |pkg|
|
15
|
+
pkg.need_tar = pkg_config.formats.tgz
|
16
|
+
pkg.need_zip = pkg_config.formats.zip
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Install as a gem"
|
20
|
+
task :install => [:clobber, :package] do
|
21
|
+
sh "sudo gem install pkg/#{Hitimes::GEM_SPEC.full_name}.gem"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Uninstall gem"
|
25
|
+
task :uninstall do
|
26
|
+
sh "sudo gem uninstall -x #{Hitimes::GEM_SPEC.name}"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "dump gemspec"
|
30
|
+
task :gemspec do
|
31
|
+
puts Hitimes::GEM_SPEC.to_ruby
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "dump gemspec for win"
|
35
|
+
task :gemspec_win do
|
36
|
+
puts Hitimes::GEM_SPEC_WIN.to_ruby
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "dump gemspec for java"
|
40
|
+
task :gemspec_java do
|
41
|
+
puts Hitimes::GEM_SPEC_JAVA.to_ruby
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "reinstall gem"
|
45
|
+
task :reinstall => [:uninstall, :repackage, :install]
|
46
|
+
|
47
|
+
desc "package up a windows gem"
|
48
|
+
task :package_win => :clean do
|
49
|
+
Configuration.for("extension").cross_rbconfig.keys.each do |rbconfig|
|
50
|
+
v = rbconfig.split("-").last
|
51
|
+
s = v.sub(/\.\d$/,'')
|
52
|
+
sh "rake ext:build_win-#{v}"
|
53
|
+
mkdir_p "lib/hitimes/#{s}", :verbose => true
|
54
|
+
cp "ext/hitimes/hitimes_ext.so", "lib/hitimes/#{s}/", :verbose => true
|
55
|
+
end
|
56
|
+
|
57
|
+
Hitimes::SPECS.each do |spec|
|
58
|
+
next if spec.platform == "ruby"
|
59
|
+
spec.files += FileList["lib/hitimes/{1.8,1.9}/**.{dll,so}"]
|
60
|
+
Gem::Builder.new( spec ).build
|
61
|
+
mkdir "pkg" unless File.directory?( 'pkg' )
|
62
|
+
mv Dir["*.gem"].first, "pkg"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
if RUBY_PLATFORM == "java" then
|
67
|
+
desc "package up a jruby gem"
|
68
|
+
task :package_java => "ext:build_java" do
|
69
|
+
Hitimes::GEM_SPEC_JAVA.files += FileList["lib/hitimes/*.jar"]
|
70
|
+
Hitimes::GEM_SPEC_JAVA.files += FileList["ext/java/src/hitimes/*.java"]
|
71
|
+
Gem::Builder.new( Hitimes::GEM_SPEC_JAVA ).build
|
72
|
+
mv Dir["*.gem"].first, "pkg"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
task :clobber do
|
77
|
+
rm_rf "lib/hitimes/1.8"
|
78
|
+
rm_rf "lib/hitimes/1.9"
|
79
|
+
rm_rf "lib/hitimes/*.jar"
|
80
|
+
end
|
81
|
+
|
82
|
+
task :prep => [:clean, :package, :package_win, :package_java ]
|
83
|
+
|
84
|
+
desc "distribute copiously"
|
85
|
+
task :copious => [:clean, :package, :package_win, :package_java ] do
|
86
|
+
gems = Hitimes::SPECS.collect { |s| "#{s.full_name}.gem" }
|
87
|
+
Rake::SshFilePublisher.new('jeremy@copiousfreetime.org',
|
88
|
+
'/var/www/vhosts/www.copiousfreetime.org/htdocs/gems/gems',
|
89
|
+
'pkg', *gems).upload
|
90
|
+
sh "ssh jeremy@copiousfreetime.org rake -f /var/www/vhosts/www.copiousfreetime.org/htdocs/gems/Rakefile"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'tasks/config'
|
2
|
+
|
3
|
+
#-----------------------------------------------------------------------
|
4
|
+
# Documentation
|
5
|
+
#-----------------------------------------------------------------------
|
6
|
+
|
7
|
+
if rdoc_config = Configuration.for_if_exist?('rdoc') then
|
8
|
+
|
9
|
+
namespace :doc do
|
10
|
+
|
11
|
+
require 'rdoc'
|
12
|
+
require 'rake/rdoctask'
|
13
|
+
|
14
|
+
# generating documentation locally
|
15
|
+
Rake::RDocTask.new do |rdoc|
|
16
|
+
rdoc.rdoc_dir = rdoc_config.output_dir
|
17
|
+
rdoc.options = rdoc_config.options
|
18
|
+
rdoc.rdoc_files = rdoc_config.files.sort
|
19
|
+
rdoc.title = rdoc_config.title
|
20
|
+
rdoc.main = rdoc_config.main_page
|
21
|
+
end
|
22
|
+
|
23
|
+
if rubyforge_config = Configuration.for_if_exist?('rubyforge') then
|
24
|
+
desc "Deploy the RDoc documentation to #{rubyforge_config.rdoc_location}"
|
25
|
+
task :deploy => :rerdoc do
|
26
|
+
sh "rsync -zav --delete #{rdoc_config.output_dir}/ #{rubyforge_config.rdoc_location}"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'tasks/config'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
#-----------------------------------------------------------------------
|
5
|
+
# Extensions
|
6
|
+
#-----------------------------------------------------------------------
|
7
|
+
|
8
|
+
if ext_config = Configuration.for_if_exist?('extension') then
|
9
|
+
namespace :ext do
|
10
|
+
desc "Build the extension(s)"
|
11
|
+
task :build => :clobber do
|
12
|
+
ext_config.configs.each do |extension|
|
13
|
+
path = Pathname.new(extension)
|
14
|
+
parts = path.split
|
15
|
+
conf = parts.last
|
16
|
+
Dir.chdir(path.dirname) do |d|
|
17
|
+
ruby conf.to_s
|
18
|
+
sh "make"
|
19
|
+
|
20
|
+
# install into requireable location so specs will run
|
21
|
+
subdir = "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}"
|
22
|
+
dest_dir = Hitimes::Paths.lib_path( subdir )
|
23
|
+
mkdir_p dest_dir, :verbose => true
|
24
|
+
cp "hitimes_ext.#{Config::CONFIG['DLEXT']}", dest_dir, :verbose => true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if RUBY_PLATFORM == "java" then
|
30
|
+
desc "Build the jruby extension"
|
31
|
+
task :build_java => [ :clobber, "lib/hitimes/hitimes.jar" ]
|
32
|
+
|
33
|
+
file "lib/hitimes/hitimes.jar" => FileList["ext/java/src/hitimes/*.java"] do |t|
|
34
|
+
jruby_home = Config::CONFIG['prefix']
|
35
|
+
jruby_jar = File.join( jruby_home, 'lib', 'jruby.jar' )
|
36
|
+
|
37
|
+
mkdir_p 'pkg/classes'
|
38
|
+
sh "javac -classpath #{jruby_jar} -d pkg/classes #{t.prerequisites.join(' ')}"
|
39
|
+
|
40
|
+
dest_dir = File.dirname(t.name)
|
41
|
+
sh "jar cf #{t.name} -C pkg/classes ."
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
def build_win( version = "1.8.6" )
|
47
|
+
ext_config = Configuration.for("extension")
|
48
|
+
rbconfig = ext_config.cross_rbconfig["rbconfig-#{version}"]
|
49
|
+
raise ArgumentError, "No cross compiler for version #{version}, we have #{ext_config.cross_rbconfig.keys.join(",")}" unless rbconfig
|
50
|
+
Hitimes::GEM_SPEC.extensions.each do |extension|
|
51
|
+
path = Pathname.new(extension)
|
52
|
+
parts = path.split
|
53
|
+
conf = parts.last
|
54
|
+
rvm = File.expand_path( "~/.rvm/bin/rvm" )
|
55
|
+
Dir.chdir(path.dirname) do |d|
|
56
|
+
if File.exist?( "Makefile" ) then
|
57
|
+
sh "make clean distclean"
|
58
|
+
end
|
59
|
+
cp "#{rbconfig}", "rbconfig.rb"
|
60
|
+
rubylib = ENV['RUBYLIB']
|
61
|
+
ENV['RUBYLIB'] = "."
|
62
|
+
sh %[#{rvm} #{version} -S extconf.rb]
|
63
|
+
ENV['RUBYLIB'] = rubylib
|
64
|
+
sh "make"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
win_builds = []
|
70
|
+
ext_config.cross_rbconfig.keys.each do |v|
|
71
|
+
s = v.split("-").last
|
72
|
+
desc "Build the extension for windows version #{s}"
|
73
|
+
win_bname = "build_win-#{s}"
|
74
|
+
win_builds << win_bname
|
75
|
+
task win_bname => :clean do
|
76
|
+
build_win( s )
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
task :clean do
|
81
|
+
ext_config.configs.each do |extension|
|
82
|
+
path = Pathname.new(extension)
|
83
|
+
parts = path.split
|
84
|
+
conf = parts.last
|
85
|
+
Dir.chdir(path.dirname) do |d|
|
86
|
+
if File.exist?( "Makefile" ) then
|
87
|
+
sh "make clean"
|
88
|
+
end
|
89
|
+
rm_f "rbconfig.rb"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
task :clobber do
|
95
|
+
ext_config.configs.each do |extension|
|
96
|
+
path = Pathname.new(extension)
|
97
|
+
parts = path.split
|
98
|
+
conf = parts.last
|
99
|
+
Dir.chdir(path.dirname) do |d|
|
100
|
+
if File.exist?( "Makefile" ) then
|
101
|
+
sh "make distclean"
|
102
|
+
end
|
103
|
+
rm_f "rbconfig.rb"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
require 'tasks/config'
|
3
|
+
|
4
|
+
#--------------------------------------------------------------------------------
|
5
|
+
# configuration for running rspec. This shows up as the test:default task
|
6
|
+
#--------------------------------------------------------------------------------
|
7
|
+
if spec_config = Configuration.for_if_exist?("test") then
|
8
|
+
if spec_config.mode == "spec" then
|
9
|
+
namespace :test do
|
10
|
+
|
11
|
+
task :default => :spec
|
12
|
+
|
13
|
+
require 'spec/rake/spectask'
|
14
|
+
Spec::Rake::SpecTask.new do |r|
|
15
|
+
r.ruby_opts = spec_config.ruby_opts
|
16
|
+
r.libs = [ Hitimes::Paths.lib_path,
|
17
|
+
Hitimes::Paths.root_dir ]
|
18
|
+
r.spec_files = spec_config.files
|
19
|
+
r.spec_opts = spec_config.options
|
20
|
+
|
21
|
+
if rcov_config = Configuration.for_if_exist?('rcov') then
|
22
|
+
r.rcov = true
|
23
|
+
r.rcov_dir = rcov_config.output_dir
|
24
|
+
r.rcov_opts = rcov_config.rcov_opts
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
pre_req = "ext:build"
|
29
|
+
pre_req += "_java" if RUBY_PLATFORM == "java"
|
30
|
+
task :spec => pre_req
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'tasks/config'
|
2
|
+
|
3
|
+
#-----------------------------------------------------------------------
|
4
|
+
# Rubyforge additions to the task library
|
5
|
+
#-----------------------------------------------------------------------
|
6
|
+
if rf_conf = Configuration.for_if_exist?("rubyforge") then
|
7
|
+
|
8
|
+
abort("rubyforge gem not installed 'gem install rubyforge'") unless Utils.try_require('rubyforge')
|
9
|
+
|
10
|
+
proj_conf = Configuration.for('project')
|
11
|
+
|
12
|
+
namespace :dist do
|
13
|
+
desc "Release files to rubyforge"
|
14
|
+
task :rubyforge => [:clean, :package, :package_win] do
|
15
|
+
|
16
|
+
rubyforge = RubyForge.new
|
17
|
+
|
18
|
+
config = {}
|
19
|
+
config["release_notes"] = proj_conf.description
|
20
|
+
config["release_changes"] = Utils.release_notes_from(proj_conf.history)[Hitimes::VERSION]
|
21
|
+
config["Prefomatted"] = true
|
22
|
+
|
23
|
+
|
24
|
+
rubyforge.configure config
|
25
|
+
|
26
|
+
# make sure this release doesn't already exist
|
27
|
+
releases = rubyforge.autoconfig['release_ids']
|
28
|
+
if releases.has_key?(Hitimes::GEM_SPEC.name) and releases[Hitimes::GEM_SPEC.name][Hitimes::VERSION] then
|
29
|
+
abort("Release #{Hitimes::VERSION} already exists! Unable to release.")
|
30
|
+
end
|
31
|
+
|
32
|
+
puts "Uploading to rubyforge..."
|
33
|
+
files = FileList[File.join("pkg","#{Hitimes::GEM_SPEC.name}-#{Hitimes::VERSION}*.*")].to_a
|
34
|
+
files.each do |f|
|
35
|
+
puts " * #{f}"
|
36
|
+
end
|
37
|
+
rubyforge.login
|
38
|
+
rubyforge.add_release(Hitimes::GEM_SPEC.rubyforge_project, Hitimes::GEM_SPEC.name, Hitimes::VERSION, *files)
|
39
|
+
puts "done."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
namespace :announce do
|
44
|
+
desc "Post news of #{proj_conf.name} to #{rf_conf.project} on rubyforge"
|
45
|
+
task :rubyforge do
|
46
|
+
info = Utils.announcement
|
47
|
+
rubyforge = RubyForge.new
|
48
|
+
rubyforge.configure
|
49
|
+
rubyforge.login
|
50
|
+
rubyforge.post_news(rf_conf.project, info[:subject], "#{info[:title]}\n\n#{info[:urls]}\n\n#{info[:release_notes]}")
|
51
|
+
puts "Posted to rubyforge"
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
data/tasks/utils.rb
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'hitimes/version'
|
2
|
+
|
3
|
+
#-------------------------------------------------------------------------------
|
4
|
+
# Additions to the Configuration class that are useful
|
5
|
+
#-------------------------------------------------------------------------------
|
6
|
+
class Configuration
|
7
|
+
class << self
|
8
|
+
def exist?( name )
|
9
|
+
Configuration::Table.has_key?( name )
|
10
|
+
end
|
11
|
+
|
12
|
+
def for_if_exist?( name )
|
13
|
+
if self.exist?( name ) then
|
14
|
+
self.for( name )
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
#-------------------------------------------------------------------------------
|
21
|
+
# some useful utilitiy methods for the tasks
|
22
|
+
#-------------------------------------------------------------------------------
|
23
|
+
module Utils
|
24
|
+
class << self
|
25
|
+
|
26
|
+
# Try to load the given _library_ using the built-in require, but do not
|
27
|
+
# raise a LoadError if unsuccessful. Returns +true+ if the _library_ was
|
28
|
+
# successfully loaded; returns +false+ otherwise.
|
29
|
+
#
|
30
|
+
def try_require( lib )
|
31
|
+
require lib
|
32
|
+
true
|
33
|
+
rescue LoadError
|
34
|
+
false
|
35
|
+
end
|
36
|
+
|
37
|
+
# partition an rdoc file into sections, and return the text of the section
|
38
|
+
# given.
|
39
|
+
def section_of(file, section_name)
|
40
|
+
File.read(file).split(/^(?==)/).each do |section|
|
41
|
+
lines = section.split("\n")
|
42
|
+
return lines[1..-1].join("\n").strip if lines.first =~ /#{section_name}/i
|
43
|
+
end
|
44
|
+
nil
|
45
|
+
end
|
46
|
+
|
47
|
+
# Get an array of all the changes in the application for a particular
|
48
|
+
# release. This is done by looking in the history file and grabbing the
|
49
|
+
# information for the most recent release. The history file is assumed to
|
50
|
+
# be in RDoc format and version release are 2nd tier sections separated by
|
51
|
+
# '== Version X.Y.Z'
|
52
|
+
#
|
53
|
+
# returns:: A hash of notes keyed by version number
|
54
|
+
#
|
55
|
+
def release_notes_from(history_file)
|
56
|
+
releases = {}
|
57
|
+
File.read(history_file).split(/^(?=== Version)/).each do |section|
|
58
|
+
lines = section.split("\n")
|
59
|
+
md = %r{Version ((\w+\.)+\w+)}.match(lines.first)
|
60
|
+
next unless md
|
61
|
+
releases[md[1]] = lines[1..-1].join("\n").strip
|
62
|
+
end
|
63
|
+
return releases
|
64
|
+
end
|
65
|
+
|
66
|
+
# return a hash of useful information for the latest release
|
67
|
+
# urls, subject, title, description and latest release notes
|
68
|
+
#
|
69
|
+
def announcement
|
70
|
+
cfg = Configuration.for("project")
|
71
|
+
{
|
72
|
+
:subject => "#{cfg.name} #{Hitimes::VERSION} Released",
|
73
|
+
:title => "#{cfg.name} version #{Hitimes::VERSION} has been released.",
|
74
|
+
:urls => "#{cfg.homepage}",
|
75
|
+
:description => "#{cfg.description.rstrip}",
|
76
|
+
:release_notes => Utils.release_notes_from(cfg.history)[Hitimes::VERSION].rstrip
|
77
|
+
}
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end # << self
|
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hitimes
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 1.1.0
|
10
|
+
platform: java
|
11
|
+
authors:
|
12
|
+
- Jeremy Hinegardner
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-07-28 00:00:00 -06:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rake
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 8
|
30
|
+
- 1
|
31
|
+
version: 0.8.1
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: configuration
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 0
|
44
|
+
- 5
|
45
|
+
version: 0.0.5
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: json
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 1
|
58
|
+
- 3
|
59
|
+
version: 1.1.3
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake-compiler
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
- 5
|
72
|
+
- 0
|
73
|
+
version: 0.5.0
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
description: |-
|
77
|
+
Hitimes is a fast, high resolution timer library for recording
|
78
|
+
performance metrics. It uses the appropriate C method calls for each
|
79
|
+
system to get the highest granularity time increments possible.
|
80
|
+
|
81
|
+
It currently supports any of the following systems:
|
82
|
+
|
83
|
+
* any system with the POSIX call <tt>clock_gettime()</tt>,
|
84
|
+
* Mac OS X
|
85
|
+
* Windows
|
86
|
+
|
87
|
+
Using Hitimes can be faster than using a series of +Time.new+ calls, and
|
88
|
+
it will have a much higher granularity. It is definitely faster than
|
89
|
+
using +Process.times+.
|
90
|
+
email: jeremy@copiousfreetime.org
|
91
|
+
executables: []
|
92
|
+
|
93
|
+
extensions: []
|
94
|
+
|
95
|
+
extra_rdoc_files:
|
96
|
+
- README
|
97
|
+
- HISTORY
|
98
|
+
- LICENSE
|
99
|
+
- lib/hitimes.rb
|
100
|
+
- lib/hitimes/metric.rb
|
101
|
+
- lib/hitimes/mutexed_stats.rb
|
102
|
+
- lib/hitimes/paths.rb
|
103
|
+
- lib/hitimes/stats.rb
|
104
|
+
- lib/hitimes/timed_metric.rb
|
105
|
+
- lib/hitimes/timed_value_metric.rb
|
106
|
+
- lib/hitimes/value_metric.rb
|
107
|
+
- lib/hitimes/version.rb
|
108
|
+
files:
|
109
|
+
- examples/benchmarks.rb
|
110
|
+
- examples/stats.rb
|
111
|
+
- ext/hitimes/hitimes_ext.c
|
112
|
+
- ext/hitimes/hitimes_instant_clock_gettime.c
|
113
|
+
- ext/hitimes/hitimes_instant_osx.c
|
114
|
+
- ext/hitimes/hitimes_instant_windows.c
|
115
|
+
- ext/hitimes/hitimes_interval.c
|
116
|
+
- ext/hitimes/hitimes_stats.c
|
117
|
+
- ext/hitimes/hitimes_interval.h
|
118
|
+
- ext/hitimes/hitimes_stats.h
|
119
|
+
- ext/hitimes/extconf.rb
|
120
|
+
- lib/hitimes.rb
|
121
|
+
- lib/hitimes/metric.rb
|
122
|
+
- lib/hitimes/mutexed_stats.rb
|
123
|
+
- lib/hitimes/paths.rb
|
124
|
+
- lib/hitimes/stats.rb
|
125
|
+
- lib/hitimes/timed_metric.rb
|
126
|
+
- lib/hitimes/timed_value_metric.rb
|
127
|
+
- lib/hitimes/value_metric.rb
|
128
|
+
- lib/hitimes/version.rb
|
129
|
+
- spec/interval_spec.rb
|
130
|
+
- spec/metric_spec.rb
|
131
|
+
- spec/mutex_stats_spec.rb
|
132
|
+
- spec/paths_spec.rb
|
133
|
+
- spec/spec_helper.rb
|
134
|
+
- spec/stats_spec.rb
|
135
|
+
- spec/timed_metric_spec.rb
|
136
|
+
- spec/timed_value_metric_spec.rb
|
137
|
+
- spec/value_metric_spec.rb
|
138
|
+
- spec/version_spec.rb
|
139
|
+
- README
|
140
|
+
- HISTORY
|
141
|
+
- LICENSE
|
142
|
+
- tasks/announce.rake
|
143
|
+
- tasks/distribution.rake
|
144
|
+
- tasks/documentation.rake
|
145
|
+
- tasks/extension.rake
|
146
|
+
- tasks/rspec.rake
|
147
|
+
- tasks/rubyforge.rake
|
148
|
+
- tasks/config.rb
|
149
|
+
- tasks/utils.rb
|
150
|
+
- Rakefile
|
151
|
+
- gemspec.rb
|
152
|
+
- lib/hitimes/hitimes.jar
|
153
|
+
- ext/java/src/hitimes/Hitimes.java
|
154
|
+
- ext/java/src/hitimes/HitimesInterval.java
|
155
|
+
- ext/java/src/hitimes/HitimesService.java
|
156
|
+
- ext/java/src/hitimes/HitimesStats.java
|
157
|
+
has_rdoc: true
|
158
|
+
homepage: http://copiousfreetime.rubyforge.org/hitimes/
|
159
|
+
licenses: []
|
160
|
+
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options:
|
163
|
+
- --line-numbers
|
164
|
+
- --main
|
165
|
+
- README
|
166
|
+
require_paths:
|
167
|
+
- lib
|
168
|
+
- ext
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
segments:
|
174
|
+
- 0
|
175
|
+
version: "0"
|
176
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
segments:
|
181
|
+
- 0
|
182
|
+
version: "0"
|
183
|
+
requirements: []
|
184
|
+
|
185
|
+
rubyforge_project: copiousfreetime
|
186
|
+
rubygems_version: 1.3.6
|
187
|
+
signing_key:
|
188
|
+
specification_version: 3
|
189
|
+
summary: Hitimes is a fast, high resolution timer library for recording performance metrics
|
190
|
+
test_files: []
|
191
|
+
|