Handbook
Glossary
gc-summary. ( -- )
Factor handbook
»
Developer tools
»
Timing code and collecting statistics
Prev:
gc-stats. ( -- )
Next:
benchmark ( quot -- runtime )
Vocabulary
tools
.
memory
Word description
Prints aggregate garbage collection statistics from the last call to
collect-gc-events
.
Definition
USING:
accessors
namespaces
prettyprint
sequences
tools.memory.private
vm
;
IN:
tools.memory
:
gc-summary.
( -- )
gc-events
get
{
{
"Collections:"
[
length
commas
]
}
{
"Cards scanned:"
[
[
cards-scanned>>
]
map-sum
commas
]
}
{
"Decks scanned:"
[
[
decks-scanned>>
]
map-sum
commas
]
}
{
"Code blocks scanned:"
[
[
code-blocks-scanned>>
]
map-sum
commas
]
}
{
"Total time:"
[
[
total-time>>
]
map-sum
nanos>string
]
}
{
"Card scan time:"
[
PHASE-CARD-SCAN
sum-phase-times
]
}
{
"Code block scan time:"
[
PHASE-CODE-SCAN
sum-phase-times
]
}
{
"Marking time:"
[
PHASE-MARKING
sum-phase-times
]
}
{
"Data heap sweep time:"
[
PHASE-DATA-SWEEP
sum-phase-times
]
}
{
"Code heap sweep time:"
[
PHASE-CODE-SWEEP
sum-phase-times
]
}
{
"Data compaction time:"
[
PHASE-DATA-COMPACTION
sum-phase-times
]
}
}
object-table.
;