Skip to content

Commit fd883d4

Browse files
committed
Add docs, specs, linter, elvis, and CI
1 parent 7869753 commit fd883d4

23 files changed

+338
-474
lines changed

.dir-locals.el

-9
This file was deleted.

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "*"
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
test:
14+
name: OTP ${{matrix.otp}}
15+
runs-on: 'ubuntu-24.04'
16+
strategy:
17+
matrix:
18+
otp: ['27', '26', '25']
19+
rebar3: ['3.24.0']
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: erlef/setup-beam@v1
23+
with:
24+
otp-version: ${{matrix.otp}}
25+
rebar3-version: ${{matrix.rebar3}}
26+
- run: rebar3 compile
27+
- run: rebar3 xref
28+
- run: rebar3 lint
29+
- run: rebar3 ex_doc
30+
- run: rebar3 fmt --check
31+
if: ${{ matrix.otp == '27' }}
32+
- run: rebar3 dialyzer
33+
if: ${{ matrix.otp == '27' }}
34+
- run: rebar3 eunit
35+
- run: rebar3 ct
36+
- run: rebar3 do cover, covertool generate
37+
- name: install valgrind
38+
if: ${{ matrix.otp == '27' }}
39+
timeout-minutes: 10
40+
run: |
41+
sudo apt-get -qq update
42+
sudo apt-get -qq install -y build-essential git-core perl valgrind
43+
- run: make -C c_src memory-test
44+
if: ${{ matrix.otp == '27' }}
45+
- name: Upload code coverage
46+
uses: codecov/codecov-action@v5
47+
with:
48+
files: _build/test/covertool/*.covertool.xml
49+
token: ${{ secrets.CODECOV_TOKEN }}
50+
fail_ci_if_error: true
51+
verbose: true

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
_*
33
.eunit
44
*.o
5+
*.d
6+
*.gcda
7+
*.gcno
58
*.so
69
*.beam
710
*.plt
@@ -16,4 +19,6 @@ logs
1619
_build
1720
deps
1821
__checkouts
19-
_checkouts
22+
_checkouts
23+
priv
24+
doc

.travis.yml

-11
This file was deleted.

README.md

+14-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Prometheus.io Process Collector
2-
[![Hex.pm](https://img.shields.io/hexpm/v//prometheus_process_collector.svg?maxAge=2592000)](https://hex.pm/packages/prometheus_process_collector)
2+
[![Hex.pm](https://img.shields.io/hexpm/v/prometheus_process_collector.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus_process_collector)
33
[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus_process_collector.svg?maxAge=2592000)](https://hex.pm/packages/prometheus_process_collector)
4-
[![Build Status](https://travis-ci.org/deadtrickster/prometheus_process_collector.svg?branch=master)](https://travis-ci.org/deadtrickster/prometheus_process_collector)
4+
[![Hex
5+
Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/prometheus_process_collector/)
6+
[![GitHub Actions](https://github.com/prometheus-erl/prometheus_process_collector/actions/workflows/ci.yml/badge.svg)](https://github.com/prometheus-erl/prometheus_process_collector/actions/workflows/ci.yml)
7+
[![Codecov](https://codecov.io/github/prometheus-erl/prometheus_process_collector/graph/badge.svg?token=G9HB5UKNIY)](https://codecov.io/github/prometheus-erl/prometheus_process_collector)
8+
59

610
Collector which exports the current state of process metrics including cpu, memory, file descriptor usage and native threads count as well as the process start and up times.
711

@@ -79,31 +83,25 @@ process_voluntary_context_switches_total 1131
7983
# TYPE process_involuntary_context_switches_total counter
8084
# HELP process_involuntary_context_switches_total Number of times a context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice.
8185
process_involuntary_context_switches_total 208
82-
8386
```
8487

8588
Usage
8689
-----
8790

8891
You can register this collector manually using `prometheus_process_collector/0,1` or use `default_collectors` env entry for `prometheus`.
8992

90-
With [Prometheus Plugs](https://github.com/deadtrickster/prometheus-plugs) - just add prometheus_process_collector dependency to top-level project (i.e. [like here](https://github.com/deadtrickster/prometheus-plugs-example/edit/master/mix.exs)).
93+
With [Prometheus Plugs](https://github.com/prometheus-erl/prometheus-plugs) - just add prometheus_process_collector dependency to top-level project (i.e. [like here](https://github.com/prometheus-erl/prometheus-plugs-example/edit/master/mix.exs)).
9194

9295
## Integrations / Collectors / Instrumenters
93-
- [Ecto collector](https://github.com/deadtrickster/prometheus-ecto)
94-
- [Plugs Instrumenter/Exporter](https://github.com/deadtrickster/prometheus-plugs)
96+
- [Ecto collector](https://github.com/prometheus-erl/prometheus-ecto)
97+
- [Plugs Instrumenter/Exporter](https://github.com/prometheus-erl/prometheus-plugs)
9598
- [Elli middleware](https://github.com/elli-lib/elli_prometheus)
9699
- [Fuse plugin](https://github.com/jlouis/fuse#fuse_stats_prometheus)
97-
- [Phoenix instrumenter](https://github.com/deadtrickster/prometheus-phoenix)
98-
- [Process Info Collector](https://github.com/deadtrickster/prometheus_process_collector.erl)
99-
- [Prometheus.erl](https://github.com/deadtrickster/prometheus.erl)
100-
- [Prometheus.ex](https://github.com/deadtrickster/prometheus.ex)
101-
- [RabbitMQ Exporter](https://github.com/deadtrickster/prometheus_rabbitmq_exporter)
102-
103-
Build
104-
-----
105-
106-
$ rebar3 compile
100+
- [Phoenix instrumenter](https://github.com/prometheus-erl/prometheus-phoenix)
101+
- [Process Info Collector](https://github.com/prometheus-erl/prometheus_process_collector)
102+
- [Prometheus.erl](https://github.com/prometheus-erl/prometheus.erl)
103+
- [Prometheus.ex](https://github.com/prometheus-erl/prometheus.ex)
104+
- [RabbitMQ Exporter](https://github.com/prometheus-erl/prometheus_rabbitmq_exporter)
107105

108106
License
109107
-----

bin/checks.sh

-3
This file was deleted.

bin/increment-version

-88
This file was deleted.

doc/edoc-info

-3
This file was deleted.

doc/erlang.png

-2.06 KB
Binary file not shown.

doc/index.html

-17
This file was deleted.

doc/modules-frame.html

-12
This file was deleted.

doc/overview-summary.html

-16
This file was deleted.

doc/prometheus_process_collector.html

-50
This file was deleted.

0 commit comments

Comments
 (0)