All Projects → Skarlso → Effrit

Skarlso / Effrit

Licence: mit
Go Efferent and Afferent package metric calculator.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Effrit

Opencensus Java
A stats collection and distributed tracing framework
Stars: ✭ 640 (+3455.56%)
Mutual labels:  metrics
Pcp
Performance Co-Pilot
Stars: ✭ 716 (+3877.78%)
Mutual labels:  metrics
Analytics
Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
Stars: ✭ 814 (+4422.22%)
Mutual labels:  metrics
Jboot
一个优雅的微服务框架,SpringCloud 之外的另一个选择,已经使用在用户量过亿的商业产品上,有超过1000家公司在使用Jboot做极速开发...
Stars: ✭ 655 (+3538.89%)
Mutual labels:  metrics
Snmp exporter
SNMP Exporter for Prometheus
Stars: ✭ 705 (+3816.67%)
Mutual labels:  metrics
Akumuli
Time-series database
Stars: ✭ 754 (+4088.89%)
Mutual labels:  metrics
Grafterm
Metrics dashboards on terminal (a grafana inspired terminal version)
Stars: ✭ 613 (+3305.56%)
Mutual labels:  metrics
Django Prometheus
Export Django monitoring metrics for Prometheus.io
Stars: ✭ 823 (+4472.22%)
Mutual labels:  metrics
Opentelemetry Js
OpenTelemetry JavaScript Client
Stars: ✭ 700 (+3788.89%)
Mutual labels:  metrics
Elixometer
A light Elixir wrapper around exometer.
Stars: ✭ 797 (+4327.78%)
Mutual labels:  metrics
Analyze Css
CSS selectors complexity and performance analyzer
Stars: ✭ 657 (+3550%)
Mutual labels:  metrics
Openmessaging Java
OpenMessaging Runtime Interface for Java
Stars: ✭ 685 (+3705.56%)
Mutual labels:  metrics
Py Motmetrics
📊 Benchmark multiple object trackers (MOT) in Python
Stars: ✭ 768 (+4166.67%)
Mutual labels:  metrics
Telemetry
Dynamic dispatching library for metrics and instrumentations.
Stars: ✭ 647 (+3494.44%)
Mutual labels:  metrics
Prometheus
Kubernetes Setup for Prometheus and Grafana
Stars: ✭ 824 (+4477.78%)
Mutual labels:  metrics
Sensu Go
Simple. Scalable. Multi-cloud monitoring.
Stars: ✭ 625 (+3372.22%)
Mutual labels:  metrics
Opstrace
Secure observability, deployed in your own network. An open source alternative to SaaS solutions like Datadog, SignalFx, ...
Stars: ✭ 743 (+4027.78%)
Mutual labels:  metrics
Graylog Plugin Metrics
Graylog output plugin for Graphite and Ganglia
Stars: ✭ 16 (-11.11%)
Mutual labels:  metrics
Resilience4j
Resilience4j is a fault tolerance library designed for Java8 and functional programming
Stars: ✭ 7,521 (+41683.33%)
Mutual labels:  metrics
Owl
distributed monitoring system
Stars: ✭ 794 (+4311.11%)
Mutual labels:  metrics

Ifrit

Effrit

Build Status

Go Efferent and Afferent package metric calculator.

Metrics calculated currently by this package:

  • [x] Instability metric
  • [x] Abstractness metric
  • [x] Distance from main sequence metric

All metrics are now supported and calculated accordingly.

Description of these metrics

https://en.wikipedia.org/wiki/Software_package_metrics

Please see Robert Cecil Martin's Clean Architecture book on details describing those metrics.

In terms of what this tool is doing, please refer to this post: Efferent and Afferent Metrics in Go.

Usage on Effrit

Here is an example of running this tool on this very project:

screenshot

Package Data

Effrit now dumps data as JSON file into the project root directly. Until I finish the CGUI for effrit, this data can be processed by any other tool. Example using Effrit project:

{
   "packages":[
      {
         "Name":"effrit",
         "FullName":"github.com/Skarlso/effrit",
         "Imports":[
            "github.com/Skarlso/effrit/cmd"
         ],
         "ImportCount":1,
         "DependedOnByCount":0,
         "DependedOnByNames":null,
         "Stability":1,
         "Abstractness":0,
         "DistanceFromMedian":0,
         "Dir":"/Users/hannibal/goprojects/effrit",
         "GoFiles":[
            "main.go"
         ]
      },
      {
         "Name":"cmd",
         "FullName":"github.com/Skarlso/effrit/cmd",
         "Imports":[
            "github.com/Skarlso/effrit/pkg"
         ],
         "ImportCount":1,
         "DependedOnByCount":1,
         "DependedOnByNames":[
            "github.com/Skarlso/effrit"
         ],
         "Stability":0.5,
         "Abstractness":0.5,
         "DistanceFromMedian":0,
         "Dir":"/Users/hannibal/goprojects/effrit/cmd",
         "GoFiles":[
            "root.go",
            "scan.go"
         ]
      },
      {
         "Name":"pkg",
         "FullName":"github.com/Skarlso/effrit/pkg",
         "Imports":[

         ],
         "ImportCount":0,
         "DependedOnByCount":1,
         "DependedOnByNames":[
            "github.com/Skarlso/effrit/cmd"
         ],
         "Stability":0,
         "Abstractness":0.3,
         "DistanceFromMedian":0.7,
         "Dir":"/Users/hannibal/goprojects/effrit/pkg",
         "GoFiles":[
            "packages.go",
            "scan.go"
         ]
      }
   ]
}

Running Effrit as a PR checker

Effrit now supports an exciting command. Effrit can be used as a monitor for package owners to see if a new dependency has been added to a package in a PR. Effrit sports a new command called check-pr. This can be executed as part of a PR checker.

Check PR must be called with the following parameters:

effrit check-pr -o Skarlso -q 7 -r effrit -p effrit
# OR
effrit check-pr --owner Skarlso --pr-number 7 --repo effrit --project-name effrit

This will compare the file that currently resides in the branch, called .effrit_package_data.json with a newly generated one.

If it detects that there are dependencies that weren't there before, Effrit, using a github token, will tag the owner of the package in the PR like this:

tagging.png

The owner comes from a comment in the Go file itself, like this:

// Package pkg will save the universe from Thanos.
// @package_owner = @Skarlso
package pkg

func MyAwesomeFunc() {
   // Do something interesting.
}

Effrit will look in the package in all the Go files until it finds an owner. If not it will tag no-one but still comment.

It will not fail the PR, it will just leave a comment. If there are multiple people it will tag everyone in a single comment.

Using as a Server

Effrit now can be executed as a github webhook server listening for PR created events.

Effrit will take that event, and do a pr-check described above on every PR created. It's important to define the project-name for ever server instance of effirt running and listening for different projects. Right now, you can run a single effirt instance for multiple projects.

That's an upcoming feature.

Contributions

Are always welcomed!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].