pantheios-ruby 0.22.2 → 0.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +26 -0
  3. data/NEWS.md +1 -0
  4. data/TODO.md +5 -2
  5. data/examples/coloured_console_log_service.rb +1 -1
  6. data/examples/multiple_modules.rb +36 -36
  7. data/examples/simple_logging.rb +1 -1
  8. data/examples/threshold_front_end.rb +1 -1
  9. data/lib/pantheios/api.rb +154 -153
  10. data/lib/pantheios/application_layer/stock_severity_levels.rb +108 -108
  11. data/lib/pantheios/application_layer.rb +5 -5
  12. data/lib/pantheios/core.rb +415 -414
  13. data/lib/pantheios/front_ends/threshold_front_end.rb +79 -79
  14. data/lib/pantheios/globals.rb +43 -43
  15. data/lib/pantheios/services/coloured_console_log_service.rb +94 -94
  16. data/lib/pantheios/services/common/console.rb +57 -57
  17. data/lib/pantheios/services/multiplexing_log_service.rb +149 -148
  18. data/lib/pantheios/services/null_log_service.rb +9 -9
  19. data/lib/pantheios/services/simple_console_log_service.rb +18 -18
  20. data/lib/pantheios/services/simple_file_log_service.rb +110 -111
  21. data/lib/pantheios/services/standard_log_service_adapter.rb +117 -117
  22. data/lib/pantheios/util/process_util.rb +24 -24
  23. data/lib/pantheios/util/reflection_util.rb +13 -13
  24. data/lib/pantheios/util/thread_util.rb +49 -49
  25. data/lib/pantheios/util/version_util.rb +33 -33
  26. data/lib/pantheios/version.rb +12 -12
  27. data/lib/pantheios.rb +11 -11
  28. data/test/performance/test_perf_simple_statements.rb +58 -58
  29. data/test/performance/test_perf_trace_variants.rb +43 -57
  30. data/test/scratch/log_rolling_by_period_daily.rb +3 -3
  31. data/test/scratch/log_rolling_by_size_and_depth.rb +3 -3
  32. data/test/scratch/log_using_blocks.rb +12 -12
  33. data/test/scratch/multiplexing_log_service.rb +32 -32
  34. data/test/unit/application_layer/tc_param_name_list.rb +13 -13
  35. data/test/unit/application_layer/tc_stock_severity_levels.rb +102 -102
  36. data/test/unit/core/tc_core_1.rb +24 -24
  37. data/test/unit/front_ends/tc_threshold_front_end.rb +65 -65
  38. data/test/unit/services/tc_multiplexing_log_service.rb +79 -79
  39. data/test/unit/services/tc_null_log_service.rb +42 -42
  40. data/test/unit/services/tc_simple_console_log_service.rb +70 -70
  41. data/test/unit/services/tc_simple_file_log_service.rb +146 -146
  42. data/test/unit/services/tc_standard_log_service_adapter.rb +94 -96
  43. data/test/unit/util/tc_process_util.rb +6 -6
  44. data/test/unit/util/tc_reflection_util.rb +20 -20
  45. data/test/unit/util/tc_thread_util.rb +46 -46
  46. data/test/unit/util/tc_version_util.rb +47 -47
  47. metadata +6 -6
@@ -6,27 +6,27 @@ module Util
6
6
  # reflection utilities
7
7
  module ReflectionUtil
8
8
 
9
- module ReflectionUtil_Constants
9
+ module ReflectionUtil_Constants
10
10
 
11
- ROOT_CLASSES = [ ::Object, ::BasicObject ]
12
- end
11
+ ROOT_CLASSES = [ ::Object, ::BasicObject ]
12
+ end
13
13
 
14
- # Obtains a list of all classes pertaining to +o+, excepting root
15
- # objects (+::Object+ and +::BaseObject+).
16
- def self.non_root_classes o
14
+ # Obtains a list of all classes pertaining to +o+, excepting root
15
+ # objects (+::Object+ and +::BaseObject+).
16
+ def self.non_root_classes o
17
17
 
18
- return [] if o.nil?
18
+ return [] if o.nil?
19
19
 
20
- return self.non_root_classes o.class unless ::Class === o
20
+ return self.non_root_classes o.class unless ::Class === o
21
21
 
22
- return [] if ReflectionUtil_Constants::ROOT_CLASSES.any? { |c| c == o }
22
+ return [] if ReflectionUtil_Constants::ROOT_CLASSES.any? { |c| c == o }
23
23
 
24
- s = o.superclass
24
+ s = o.superclass
25
25
 
26
- return [ o ] if ::Object == s
26
+ return [ o ] if ::Object == s
27
27
 
28
- [ o ] + self.non_root_classes(s)
29
- end
28
+ [ o ] + self.non_root_classes(s)
29
+ end
30
30
 
31
31
  end # module ProcessUtil
32
32
 
@@ -6,77 +6,77 @@ module Util
6
6
  # threading utilities
7
7
  module ThreadUtil
8
8
 
9
- # Creates (if necessary) and sets the given thread's +thread_name+
10
- # attribute to the given name
11
- #
12
- # === Signature
13
- #
14
- # * *Parameters:*
15
- # - +t+ [Thread, nil] The thread to be named, or +nil+ if it should
16
- # operate on the current (invoking) thread
17
- # - +name+ [String] The thread's name
18
- def self.set_thread_name t, name
9
+ # Creates (if necessary) and sets the given thread's +thread_name+
10
+ # attribute to the given name
11
+ #
12
+ # === Signature
13
+ #
14
+ # * *Parameters:*
15
+ # - +t+ [Thread, nil] The thread to be named, or +nil+ if it should
16
+ # operate on the current (invoking) thread
17
+ # - +name+ [String] The thread's name
18
+ def self.set_thread_name t, name
19
19
 
20
- t ||= Thread.current
20
+ t ||= Thread.current
21
21
 
22
- class << t; attr_accessor :thread_name; end unless t.respond_to? :thread_name
22
+ class << t; attr_accessor :thread_name; end unless t.respond_to? :thread_name
23
23
 
24
- t.thread_name = name
25
- end
24
+ t.thread_name = name
25
+ end
26
26
 
27
- # Obtains the name of the calling thread
28
- def self.get_thread_name t
27
+ # Obtains the name of the calling thread
28
+ def self.get_thread_name t
29
29
 
30
- t ||= Thread.current
30
+ t ||= Thread.current
31
31
 
32
- return t.thread_name if t.respond_to? :thread_name
32
+ return t.thread_name if t.respond_to? :thread_name
33
33
 
34
- t.to_s
35
- end
34
+ t.to_s
35
+ end
36
36
 
37
- # Inclusion module for giving the included type the +thread_name+
38
- # attribute
39
- #
40
- # If included into a thread type, or a thread instance, then
41
- module ThreadName
37
+ # Inclusion module for giving the included type the +thread_name+
38
+ # attribute
39
+ #
40
+ # If included into a thread type, or a thread instance, then
41
+ module ThreadName
42
42
 
43
- def self.included receiver
43
+ def self.included receiver
44
44
 
45
- if receiver < ::Thread
45
+ if receiver < ::Thread
46
46
 
47
- receiver.instance_eval do
47
+ receiver.instance_eval do
48
48
 
49
- define_method(:thread_name) { @thread_name || self.to_s }
50
- define_method(:thread_name=) { |name| @thread_name = name }
51
- end
52
- else
49
+ define_method(:thread_name) { defined?(@thread_name) && @thread_name || self.to_s }
50
+ define_method(:thread_name=) { |name| @thread_name = name }
51
+ end
52
+ else
53
53
 
54
- receiver.instance_eval do
54
+ receiver.instance_eval do
55
55
 
56
- define_method :thread_name do |name = (name_not_given_ = true)|
56
+ define_method :thread_name do |name = (name_not_given_ = true)|
57
57
 
58
- t = Thread.current
58
+ t = Thread.current
59
59
 
60
- has_tn = t.respond_to? :thread_name
60
+ has_tn = t.respond_to? :thread_name
61
61
 
62
- if name_not_given_
62
+ if name_not_given_
63
63
 
64
- return t.thread_name if has_tn
64
+ return t.thread_name if has_tn
65
65
 
66
- t.to_s
67
- else
66
+ t.to_s
67
+ else
68
68
 
69
- class << t; attr_accessor :thread_name; end unless has_tn
69
+ class << t; attr_accessor :thread_name; end unless has_tn
70
70
 
71
- t.thread_name = name
72
- end
73
- end
71
+ t.thread_name = name
72
+ end
73
+ end
74
74
 
75
- define_method(:thread_name=) { |name| thread_name name }
76
- end
77
- end
78
- end
79
- end
75
+ define_method(:thread_name=) { |name| thread_name name }
76
+ end
77
+ end
78
+ end
79
+ end
80
80
 
81
81
  end # module ThreadUtil
82
82
 
@@ -6,39 +6,39 @@ module Util
6
6
  # version utilities
7
7
  module VersionUtil
8
8
 
9
- # Compares two version designators and returns a spaceship comparison
10
- # result
11
- #
12
- # === Signature
13
- #
14
- # * *Parameters:*
15
- # - +lhs+ [String, Array[Integer|String]] The left-hand comparand
16
- # - +rhs+ [String, Array[Integer|String]] The right-hand comparand
17
- #
18
- # * *Returns:*
19
- # - 0 if the two version designators represent exactly the same version
20
- # - <0 if the +lhs+ version designator represents an earlier version
21
- # than the +rhs+ version designator
22
- # - >0 if the +lhs+ version designator represents a later version
23
- # than the +rhs+ version designator
24
- def self.version_compare lhs, rhs
25
-
26
- lhs = lhs.split('.') if String === lhs
27
- rhs = rhs.split('.') if String === rhs
28
-
29
- lhs = lhs.map { |n| n.to_i }
30
- rhs = rhs.map { |n| n.to_i }
31
-
32
- if lhs.size < rhs.size
33
-
34
- lhs += [ 0 ] * (rhs.size - lhs.size)
35
- else
36
-
37
- rhs += [ 0 ] * (lhs.size - rhs.size)
38
- end
39
-
40
- lhs <=> rhs
41
- end
9
+ # Compares two version designators and returns a spaceship comparison
10
+ # result
11
+ #
12
+ # === Signature
13
+ #
14
+ # * *Parameters:*
15
+ # - +lhs+ [String, Array[Integer|String]] The left-hand comparand
16
+ # - +rhs+ [String, Array[Integer|String]] The right-hand comparand
17
+ #
18
+ # * *Returns:*
19
+ # - 0 if the two version designators represent exactly the same version
20
+ # - <0 if the +lhs+ version designator represents an earlier version
21
+ # than the +rhs+ version designator
22
+ # - >0 if the +lhs+ version designator represents a later version
23
+ # than the +rhs+ version designator
24
+ def self.version_compare lhs, rhs
25
+
26
+ lhs = lhs.split('.') if String === lhs
27
+ rhs = rhs.split('.') if String === rhs
28
+
29
+ lhs = lhs.map { |n| n.to_i }
30
+ rhs = rhs.map { |n| n.to_i }
31
+
32
+ if lhs.size < rhs.size
33
+
34
+ lhs += [ 0 ] * (rhs.size - lhs.size)
35
+ else
36
+
37
+ rhs += [ 0 ] * (lhs.size - rhs.size)
38
+ end
39
+
40
+ lhs <=> rhs
41
+ end
42
42
  end # module VersionUtil
43
43
 
44
44
  end # module Util
@@ -5,7 +5,7 @@
5
5
  # Purpose: Version for Pantheios.Ruby library
6
6
  #
7
7
  # Created: 2nd April 2011
8
- # Updated: 27th August 2026
8
+ # Updated: 30th August 2026
9
9
  #
10
10
  # Home: https://github.com/synesissoftware/Pantheios.Ruby
11
11
  #
@@ -50,18 +50,18 @@
50
50
 
51
51
  module Pantheios
52
52
 
53
- # Current version of the Pantheios.Ruby library
54
- VERSION = '0.22.2'
53
+ # Current version of the Pantheios.Ruby library
54
+ VERSION = '0.22.3'
55
55
 
56
- private
57
- VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
58
- public
59
- # Major version of the Pantheios.Ruby library
60
- VERSION_MAJOR = VERSION_PARTS_[0] # :nodoc:
61
- # Minor version of the Pantheios.Ruby library
62
- VERSION_MINOR = VERSION_PARTS_[1] # :nodoc:
63
- # Revision version of the Pantheios.Ruby library
64
- VERSION_REVISION = VERSION_PARTS_[2] # :nodoc:
56
+ private
57
+ VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
58
+ public
59
+ # Major version of the Pantheios.Ruby library
60
+ VERSION_MAJOR = VERSION_PARTS_[0] # :nodoc:
61
+ # Minor version of the Pantheios.Ruby library
62
+ VERSION_MINOR = VERSION_PARTS_[1] # :nodoc:
63
+ # Revision version of the Pantheios.Ruby library
64
+ VERSION_REVISION = VERSION_PARTS_[2] # :nodoc:
65
65
 
66
66
  end # module Pantheios
67
67
 
data/lib/pantheios.rb CHANGED
@@ -19,21 +19,21 @@ require 'pantheios/version'
19
19
 
20
20
  module Pantheios
21
21
 
22
- # @!visibility private
23
- def self.included receiver # :nodoc:
22
+ # @!visibility private
23
+ def self.included receiver # :nodoc:
24
24
 
25
- if ::Pantheios::Globals.HAS_CASCADED_INCLUDES
25
+ if ::Pantheios::Globals.HAS_CASCADED_INCLUDES
26
26
 
27
- receiver.class_eval do
27
+ receiver.class_eval do
28
28
 
29
- include ::Pantheios::API
30
- include ::Pantheios::ApplicationLayer
31
- include ::Pantheios::Util
32
- end
33
- end
29
+ include ::Pantheios::API
30
+ include ::Pantheios::ApplicationLayer
31
+ include ::Pantheios::Util
32
+ end
33
+ end
34
34
 
35
- ::Pantheios::Core.register_include self, receiver
36
- end
35
+ ::Pantheios::Core.register_include self, receiver
36
+ end
37
37
 
38
38
  end # module Pantheios
39
39
 
@@ -6,7 +6,7 @@
6
6
  # Purpose: COMPLETE_ME
7
7
  #
8
8
  # Created: 22nd January 2018
9
- # Updated: 22nd January 2018
9
+ # Updated: 28th August 2026
10
10
  #
11
11
  # Author: Matthew Wilson
12
12
  #
@@ -31,102 +31,102 @@ N = 5000000
31
31
 
32
32
  def severity_logged? severity
33
33
 
34
- return false
34
+ return false
35
35
  end
36
36
 
37
37
 
38
38
  Benchmark.benchmark(Benchmark::CAPTION, 24, Benchmark::FORMAT, 'total:', 'avg:') do |r|
39
39
 
40
- totals = []
40
+ totals = []
41
41
 
42
- totals << r.report("arguments (1-arg)") do
42
+ totals << r.report("arguments (1-arg)") do
43
43
 
44
- for i in (0...N) do
44
+ N.times do
45
45
 
46
- log :notice, 'the cat in the hat.'
47
- end
48
- end
46
+ log :notice, 'the cat in the hat.'
47
+ end
48
+ end
49
49
 
50
- totals << r.report("blocks (1-arg)") do
50
+ totals << r.report("blocks (1-arg)") do
51
51
 
52
- for i in (0...N) do
52
+ N.times do
53
53
 
54
- log(:notice) { 'the cat in the hat!' }
55
- end
56
- end
54
+ log(:notice) { 'the cat in the hat!' }
55
+ end
56
+ end
57
57
 
58
- totals << r.report("args-if (1-arg)") do
58
+ totals << r.report("args-if (1-arg)") do
59
59
 
60
- for i in (0...N) do
60
+ N.times do
61
61
 
62
- log :notice, 'the cat in the hat.' if severity_logged? :notice
63
- end
64
- end
62
+ log :notice, 'the cat in the hat.' if severity_logged? :notice
63
+ end
64
+ end
65
65
 
66
66
 
67
- totals << r.report("arguments (simple)") do
67
+ totals << r.report("arguments (simple)") do
68
68
 
69
- for i in (0...N) do
69
+ N.times do
70
70
 
71
- log :notice, 'the ', 'cat ', 'in ', 'the ', 'hat.'
72
- end
73
- end
71
+ log :notice, 'the ', 'cat ', 'in ', 'the ', 'hat.'
72
+ end
73
+ end
74
74
 
75
- totals << r.report("blocks (simple)") do
75
+ totals << r.report("blocks (simple)") do
76
76
 
77
- for i in (0...N) do
77
+ N.times do
78
78
 
79
- log(:notice) { 'the ' + 'cat ' + 'in ' + 'the ' + 'hat!' }
80
- end
81
- end
79
+ log(:notice) { 'the ' + 'cat ' + 'in ' + 'the ' + 'hat!' }
80
+ end
81
+ end
82
82
 
83
- totals << r.report("args-if (simple)") do
83
+ totals << r.report("args-if (simple)") do
84
84
 
85
- for i in (0...N) do
85
+ N.times do
86
86
 
87
- log :notice, 'the ', 'cat ', 'in ', 'the ', 'hat.' if severity_logged? :notice
88
- end
89
- end
87
+ log :notice, 'the ', 'cat ', 'in ', 'the ', 'hat.' if severity_logged? :notice
88
+ end
89
+ end
90
90
 
91
91
 
92
- totals << r.report("arguments (complex)") do
92
+ totals << r.report("arguments (complex)") do
93
93
 
94
- cat = 'cat'
95
- hat = :hat
96
- t = Time.now
94
+ cat = 'cat'
95
+ hat = :hat
96
+ t = Time.now
97
97
 
98
- for i in (0...N) do
98
+ N.times do
99
99
 
100
- log :notice, "the #{cat} in the #{hat} (#{t})"
101
- end
102
- end
100
+ log :notice, "the #{cat} in the #{hat} (#{t})"
101
+ end
102
+ end
103
103
 
104
- totals << r.report("blocks (complex)") do
104
+ totals << r.report("blocks (complex)") do
105
105
 
106
- cat = 'cat'
107
- hat = :hat
108
- t = Time.now
106
+ cat = 'cat'
107
+ hat = :hat
108
+ t = Time.now
109
109
 
110
- for i in (0...N) do
110
+ N.times do
111
111
 
112
- log(:notice) { "the #{cat} in the #{hat} (#{t})" }
113
- end
114
- end
112
+ log(:notice) { "the #{cat} in the #{hat} (#{t})" }
113
+ end
114
+ end
115
115
 
116
- totals << r.report("args-if (complex)") do
116
+ totals << r.report("args-if (complex)") do
117
117
 
118
- cat = 'cat'
119
- hat = :hat
120
- t = Time.now
118
+ cat = 'cat'
119
+ hat = :hat
120
+ t = Time.now
121
121
 
122
- for i in (0...N) do
122
+ N.times do
123
123
 
124
- log :notice, "the #{cat} in the #{hat} (#{t})" if severity_logged? :notice
125
- end
126
- end
124
+ log :notice, "the #{cat} in the #{hat} (#{t})" if severity_logged? :notice
125
+ end
126
+ end
127
127
 
128
128
 
129
- [ totals.inject(:+), totals.inject(:+) / totals.size ]
129
+ [ totals.inject(:+), totals.inject(:+) / totals.size ]
130
130
  end
131
131
 
132
132
 
@@ -1,19 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- #############################################################################
4
- # File: test/performance/test_perf_trace_variants.rb
5
- #
6
- # Purpose: COMPLETE_ME
7
- #
8
- # Created: 22nd January 2018
9
- # Updated: 22nd January 2018
10
- #
11
- # Author: Matthew Wilson
12
- #
13
- # Copyright: <<TBD>>
14
- #
15
- #############################################################################
16
-
17
3
  $:.unshift File.join(File.dirname(__FILE__), *(['..'] * 2), 'lib')
18
4
 
19
5
  require 'pantheios/globals'
@@ -32,100 +18,100 @@ T = Time.now
32
18
 
33
19
  def severity_logged? severity
34
20
 
35
- return ::Pantheios::Core.severity_logged? severity
21
+ return ::Pantheios::Core.severity_logged? severity
36
22
  end
37
23
 
38
24
 
39
25
  def blank_trace p0, p1, p2, p3, t
40
26
 
41
- trace
27
+ trace
42
28
  end
43
29
 
44
30
  def anonymous_trace p0, p1, p2, p3, t
45
31
 
46
- trace p0, p1, p2, p3, t
32
+ trace p0, p1, p2, p3, t
47
33
  end
48
34
 
49
35
  def parameter_trace p0, p1, p2, p3, t
50
36
 
51
- trace ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t
37
+ trace ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t
52
38
  end
53
39
 
54
40
  def parameter_cond p0, p1, p2, p3, t
55
41
 
56
- trace ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t if severity_logged? :trace
42
+ trace ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t if severity_logged? :trace
57
43
  end
58
44
 
59
45
  def names_in_block p0, p1, p2, p3, t
60
46
 
61
- trace(p0, p1, p2, p3, t) { ParamNames[ :p0, :p1, :p2, :p3, :t ] }
47
+ trace(p0, p1, p2, p3, t) { ParamNames[ :p0, :p1, :p2, :p3, :t ] }
62
48
  end
63
49
 
64
50
  def all_in_block p0, p1, p2, p3, t
65
51
 
66
- trace { [ ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t ] }
52
+ trace { [ ParamNames[ :p0, :p1, :p2, :p3, :t ], p0, p1, p2, p3, t ] }
67
53
  end
68
54
 
69
55
 
70
56
  Benchmark.benchmark(Benchmark::CAPTION, 24, Benchmark::FORMAT, 'total:', 'avg:') do |r|
71
57
 
72
- t_log = r.report('plain log') do
58
+ r.report('plain log') do
73
59
 
74
- for i in (0...N) do
60
+ N.times do
75
61
 
76
- log :abc, 'd', 'ef', 't=', T
77
- end
78
- end
62
+ log :abc, 'd', 'ef', 't=', T
63
+ end
64
+ end
79
65
 
80
- t_blank_trace = r.report('blank_trace') do
66
+ r.report('blank_trace') do
81
67
 
82
- for i in (0...N) do
68
+ N.times do
83
69
 
84
- blank_trace :abc, 'd', 'ef', 't=', T
85
- end
86
- end
70
+ blank_trace :abc, 'd', 'ef', 't=', T
71
+ end
72
+ end
87
73
 
88
- t_anonymous_trace = r.report('anonymous_trace') do
74
+ r.report('anonymous_trace') do
89
75
 
90
- for i in (0...N) do
76
+ N.times do
91
77
 
92
- anonymous_trace :abc, 'd', 'ef', 't=', T
93
- end
94
- end
78
+ anonymous_trace :abc, 'd', 'ef', 't=', T
79
+ end
80
+ end
95
81
 
96
- t_parameter_trace = r.report('parameter_trace') do
82
+ r.report('parameter_trace') do
97
83
 
98
- for i in (0...N) do
84
+ N.times do
99
85
 
100
- parameter_trace :abc, 'd', 'ef', 't=', T
101
- end
102
- end
86
+ parameter_trace :abc, 'd', 'ef', 't=', T
87
+ end
88
+ end
103
89
 
104
- t_parameter_cond = r.report('parameter_cond') do
90
+ r.report('parameter_cond') do
105
91
 
106
- for i in (0...N) do
92
+ N.times do
107
93
 
108
- parameter_cond :abc, 'd', 'ef', 't=', T
109
- end
110
- end
94
+ parameter_cond :abc, 'd', 'ef', 't=', T
95
+ end
96
+ end
111
97
 
112
- t_names_in_block = r.report('names_in_block') do
98
+ r.report('names_in_block') do
113
99
 
114
- for i in (0...N) do
100
+ N.times do
115
101
 
116
- names_in_block :abc, 'd', 'ef', 't=', T
117
- end
118
- end
102
+ names_in_block :abc, 'd', 'ef', 't=', T
103
+ end
104
+ end
119
105
 
120
- t_all_in_block = r.report('all_in_block') do
106
+ r.report('all_in_block') do
121
107
 
122
- for i in (0...N) do
108
+ N.times do
123
109
 
124
- all_in_block :abc, 'd', 'ef', 't=', T
125
- end
126
- end
110
+ all_in_block :abc, 'd', 'ef', 't=', T
111
+ end
112
+ end
127
113
 
128
- # [ at_0 + at_1 + at_2 + bt_0 + bt_1 + bt_2, (at_0 + at_1 + at_2 + bt_0 + bt_1 + bt_2) / 2 ]
114
+ # [ at_0 + at_1 + at_2 + bt_0 + bt_1 + bt_2, (at_0 + at_1 + at_2 + bt_0 + bt_1 + bt_2) / 2 ]
129
115
  end
130
116
 
131
117
 
@@ -6,7 +6,7 @@
6
6
  # Purpose: Tests the log-rolling functionality of SimpleFileLogService
7
7
  #
8
8
  # Created: 4th February 2018
9
- # Updated: 4th February 2018
9
+ # Updated: 28th August 2026
10
10
  #
11
11
  # Author: Matthew Wilson
12
12
  #
@@ -33,9 +33,9 @@ log(:notice) { 'program started' }
33
33
 
34
34
  (0..1000).each do |n|
35
35
 
36
- log :informational, "increment #{n}: '#{'*' * 10 * n}'"
36
+ log :informational, "increment #{n}: '#{'*' * 10 * n}'"
37
37
 
38
- sleep 100
38
+ sleep 100
39
39
  end
40
40
 
41
41
  at_exit { log :notice, 'program ending ...' }