hitimes 1.1.1-x86-mswin32 → 1.2.0-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +45 -0
- data/{HISTORY → HISTORY.rdoc} +14 -1
- data/LICENSE +11 -8
- data/Manifest.txt +44 -0
- data/{README → README.rdoc} +18 -5
- data/Rakefile +20 -62
- data/ext/hitimes/{extconf.rb → c/extconf.rb} +3 -3
- data/ext/hitimes/{hitimes_ext.c → c/hitimes.c} +1 -1
- data/ext/hitimes/{hitimes_instant_clock_gettime.c → c/hitimes_instant_clock_gettime.c} +0 -0
- data/ext/hitimes/c/hitimes_instant_osx.c +45 -0
- data/ext/hitimes/{hitimes_instant_windows.c → c/hitimes_instant_windows.c} +0 -0
- data/ext/hitimes/{hitimes_interval.c → c/hitimes_interval.c} +15 -7
- data/ext/hitimes/{hitimes_interval.h → c/hitimes_interval.h} +5 -5
- data/ext/hitimes/{hitimes_stats.c → c/hitimes_stats.c} +0 -0
- data/ext/hitimes/{hitimes_stats.h → c/hitimes_stats.h} +0 -0
- data/ext/hitimes/java/src/hitimes/Hitimes.java +54 -0
- data/ext/hitimes/java/src/hitimes/HitimesInterval.java +181 -0
- data/ext/hitimes/java/src/hitimes/HitimesService.java +16 -0
- data/ext/hitimes/java/src/hitimes/HitimesStats.java +112 -0
- data/lib/hitimes.rb +15 -5
- data/lib/hitimes/1.8/hitimes.so +0 -0
- data/lib/hitimes/1.9/hitimes.so +0 -0
- data/lib/hitimes/version.rb +1 -50
- data/spec/hitimes_spec.rb +14 -0
- data/spec/interval_spec.rb +24 -21
- data/spec/metric_spec.rb +8 -10
- data/spec/mutex_stats_spec.rb +8 -6
- data/spec/paths_spec.rb +1 -3
- data/spec/spec_helper.rb +7 -3
- data/spec/stats_spec.rb +26 -28
- data/spec/timed_metric_spec.rb +33 -33
- data/spec/timed_value_metric_spec.rb +45 -46
- data/spec/value_metric_spec.rb +21 -23
- data/spec/version_spec.rb +4 -30
- data/tasks/default.rake +267 -0
- data/tasks/extension.rake +31 -101
- data/tasks/this.rb +209 -0
- metadata +89 -88
- data/ext/hitimes/hitimes_instant_osx.c +0 -16
- data/gemspec.rb +0 -64
- data/lib/hitimes/1.8/hitimes_ext.so +0 -0
- data/lib/hitimes/1.9/hitimes_ext.so +0 -0
- data/tasks/announce.rake +0 -42
- data/tasks/config.rb +0 -109
- data/tasks/distribution.rake +0 -93
- data/tasks/documentation.rake +0 -32
- data/tasks/rspec.rake +0 -33
- data/tasks/rubyforge.rake +0 -55
- data/tasks/utils.rb +0 -80
data/tasks/utils.rb
DELETED
@@ -1,80 +0,0 @@
|
|
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
|