name
performance_analysis :: PerfEntry :: add
Register a new event execution time in secondsperformance_analysis :: PerfEntry :: avg=
Average execution time of registered eventsperformance_analysis :: PerfEntry :: count=
Number of registered eventsperformance_analysis :: PerfEntry :: max=
Longest execution time of registered eventsperformance_analysis :: PerfEntry :: min
Shortest execution time of registered eventsperformance_analysis :: PerfEntry :: min=
Shortest execution time of registered eventsperformance_analysis :: PerfEntry :: sum=
Total execution time of this eventperformance_analysis $ PerfEntry :: SELF
Type of this instance, automatically specialized in every classperformance_analysis $ PerfEntry :: to_s
User readable representation ofself
.
performance_analysis :: PerfEntry :: add
Register a new event execution time in secondsperformance_analysis :: PerfEntry :: avg=
Average execution time of registered eventscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
performance_analysis :: PerfEntry :: count=
Number of registered eventscore :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
performance_analysis :: PerfEntry :: max=
Longest execution time of registered eventsperformance_analysis :: PerfEntry :: min
Shortest execution time of registered eventsperformance_analysis :: PerfEntry :: min=
Shortest execution time of registered eventscore :: Object :: output_class_name
Display class name on stdout (debug only).performance_analysis :: PerfEntry :: sum=
Total execution time of this event
# Statistics on wall clock execution time of a category of events by `name`
class PerfEntry
# Name of the category
var name: String
# Shortest execution time of registered events
var min = 0.0
# Longest execution time of registered events
var max = 0.0
# Average execution time of registered events
var avg = 0.0
# Number of registered events
var count = 0
# Total execution time of this event
var sum = 0.0
# Register a new event execution time in seconds
fun add(time: Float)
do
if time.to_f < min.to_f or count == 0 then min = time
if time.to_f > max.to_f then max = time
sum += time
count += 1
avg = sum / count.to_f
end
redef fun to_s do return "min {min}, max {max}, avg {avg}, sum {sum}, count {count}"
end
lib/performance_analysis/performance_analysis.nit:109,1--142,3