This document introduces Archeometer, a toolkit for analyzing Elixir codebases. It provides motivations for why such a toolkit is needed as legacy codebases grow large and complex over time. Archeometer uses a Code Query Language and various analyzers to collect data and generate reports on codebase architecture, design, and quality. Analyzers include XRef to diagram relationships between modules and a treemap visualizer. Future plans include adding repository history analysis and interactive report features.
2. Agenda
• What is Archeometer?
• Motivation
• Architecture
• Analyzers
• Usage
• Report Overview
• Future
3. What is Archeometer?
A toolkit for the analysis of Elixir codebases, from the point of view of
Architecture, Design and Quality.
An equipped laboratory to conduct your own code explorations.
5. In 20+ years as a software developer…
• I have worked with
• C, C++, Java, Python, Ruby, Groovy, .Net, PHP, Javascript, Elixir…
• Have met with huge amounts of legacy code
• With the mission of
• Making sense of it 🫠
• Fixing it !!! 🫠 🫠 🫠 🫠 🫠
6. 10 Years of Elixir !!!
• 10 years of Elixir for me!!! (
fi
rst commit on May 24th, 2013)
• It’s enough time for people to write systems that…
• Are huge
• Are very complex
• Have insu
ffi
cient tests / documentation
• Are abandoned by the original authors
• Are LEGACY
8. Tooling
• For some platforms (notably Java and .Net) there are very good tools for
managing complexity since long time ago.
• Not so for languages like Python, Ruby or Elixir.
• Solution?
• Lots of custom scripting to retrieve architectural information.
• Lots of “read de code”.
• It’s very time consuming. Not e
ffi
cient at all.
17. • XRef is all about
fi
nding and diagraming relationships between modules or
applications.
• Supports both enumeration and component name patterns.
• Supported output formats: dot, svg, png, mermaid.
• It’s not a replacement for “mix xref”, more like a complement.
XRef
19. Treemap
A treemap is a visual representation of hierarchical data, with the area of each
subcomponent representing proportionally some de
fi
ned metric.
27. Near Future
• Repository history analysis 🚀 🚀
• Livebook report (maybe) 🚀
• More algorithms for DSM analysis 🚀 🚀 🚀
28. Sometime in the future…
• Interactive diagram analysis 🚀 🚀 🚀 🚀 🚀
• On DSM
• Dynamically create DSMs for selected modules
• Collapse / expand hierarchies
• On Graphs
• Focus on certain parts of the graph
• Identify patterns or interesting features