Tasks Cheatsheet

data-collection

Data Collection

basic-execution

Basic execution

Run all data collection stages

$ mix arch.collect

include-dependencies

Include dependencies

Run all data collection stages on project and dependencies that match filter(s)

$ mix arch.collect --include-deps "phoenix*"

no-coverage

No coverage

Skip coverage information gathering stage

$ mix arch.collect --no-coverage

html-report

HTML Report

To be run, it's necessary you already successfully ran the data collection stages

basic-execution-1

Basic execution

Generate default HTML static report

$ mix arch.report.html

limit-query-results

Limit Query Results

Limit the number of results of the queries used in the report (e.g. to 10 elements)

$ mix arch.report.html --limit 10

analysis-common-options

Analysis Common Options

OptionDefaultSupported by
--formatDepends on taskapps.xref, dsm, treemap, xref
--outconsoleapps.xref, dsm, treemap, xref
--app* (All applications)dsm, treemap, xref
--ns* (All modules)dsm, treemap, xref
--dbarcheometer_<project name>.dbdsm, treemap, xref
--skip-teststruedsm, treemap

A more complex example using this options. This will generate a DSM from a database that is not the defaultone and consider only modules that belong to foo application in the namespace Foo.Bar and not ignoring the test modules.

$ mix arch.dsm \
  --out foo.bar.svg \
  --format svg \
  --app foo \
  --ns Foo.Bar \
  --skip-tests false \
  --db archeometer_wareware.db

analysis

Analysis

apps-xref

Apps XRef

Basic execution

Print the dependency graph of applications in console (as text)

$ mix arch.apps.xref 

Format

Following formats are supported

  • dot (default)
  • png
  • svg

Include dependencies

Target project and include dependencies that match the filter(s)

This option can be used on non-Umbrella projects

$ mix arch.apps.xref --include-deps "phoenix*"

xref

XRef

Basic execution

Generate a dependency graph between given modules and print it to console

$ mix arch.xref mod1 mod2 .. modN

Format

Following formats are supported

  • dot (default)
  • png
  • svg

design-structure-matrix-dsm

Design Structure Matrix (DSM)

Basic Execution

Generate a DSM of all non-test modules and print it to console

$ mix arch.dsm

Format

Following formats are supported

  • txt
  • svg

treemap

Treemap

Basic Execution

Generate a Treemap of all non-test modules from the project and print it to console

$ mix arch.treemap

Metric

For now only size metric is supported

$ mix arch.treemap --metric size

collect-subtasks

Collect Subtasks

include-dependencies-1

Include Dependencies

Just as in the main Collect task you can include dependencies (not supported by arch.collect.coverage)

$ mix arch.collect.static --include deps "phoenix*"

collect-static

Collect Static

Target project ex files but not dependencies

$ mix arch.collect.static

collect-xrefs

Collect XRefs

Save information of dependencies between project modules

$ mix arch.collect.xrefs

collect-apps

Collect Apps

Save applications names, modules implemented behaviours and structs from project

$ mix arch.collect.apps

collect-ecto

Collect Ecto

Save information of Ecto schema modules and their relationships

$ mix arch.collect.ecto

collect-coverage

Collect Coverage

Run project tests files and save coverage information

$ mix arch.collect.coverage