Serializable::inspect
to show more useful information
nitc :: modelbuilder
more_collections :: more_collections
Highly specific, but useful, collections-related classes.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatsnitc :: toolcontext
Common command-line tool infrastructure than handle options and error messagescore :: union_find
union–find algorithm using an efficient disjoint-set data structurenitc :: api_metrics
nitc :: nitmetrics
A program that collects various metrics on nit programs and libraries
# Metrics about the various posets of the model of a Nit program
module poset_metrics
import metrics_base
redef class ToolContext
var poset_metrics_phase: Phase = new PosetMetricsPhase(self, null)
end
private class PosetMetricsPhase
super Phase
redef fun process_mainmodule(mainmodule, given_mmodules)
do
if not toolcontext.opt_poset.value and not toolcontext.opt_all.value then return
var model = mainmodule.model
print "--- Poset metrics ---"
print "## Module importation hierarchy"
model.mmodule_importation_hierarchy.print_metrics
print "## Classdef hierarchy"
model.mclassdef_hierarchy.print_metrics
print "## Class hierarchy"
mainmodule.flatten_mclass_hierarchy.print_metrics
end
end
src/metrics/poset_metrics.nit:15,1--40,3