Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# The directory Mix downloads your dependencies sources to.
/deps/

# Where 3rd-party dependencies like ExDoc output generated docs.
# Where third-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
Expand All @@ -22,4 +22,6 @@ erl_crash.dump
# Ignore package tarball (built via "mix hex.build").
etop-*.tar

/test/tmp
# Temporary files, for example, from tests.
/tmp/
/test/tmp/
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
# The MIT License (MIT)

Copyright (c) 2020 E-MetroTel

Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Etop - A Unix like top library for Elixir Applications
# Etop

[license-img]: http://img.shields.io/badge/license-MIT-brightgreen.svg
[license]: http://opensource.org/licenses/MIT
[![Module Version](https://img.shields.io/hexpm/v/etop.svg)](https://hex.pm/packages/etop)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/etop/)
[![Total Download](https://img.shields.io/hexpm/dt/etop.svg)](https://hex.pm/packages/etop)
[![License](https://img.shields.io/hexpm/l/etop.svg)](https://github.com/infinityoneframework/etop/blob/master/LICENSE.md)
[![Last Updated](https://img.shields.io/github/last-commit/infinityoneframework/etop.svg)](https://github.com/infinityoneframework/etop/commits/master)

A Unix top like functionality for Elixir Applications.

Expand Down Expand Up @@ -100,7 +103,7 @@ iex(2)> Etop.load |> Etop.Report.plot_memory(height: 15)

Two types of monitors are supported:

* `:summary` monitors apply to general informaton like `load` or `memory`.
* `:summary` monitors apply to general information like `load` or `memory`.
* `:process` montitors apply to any process in the process list.

Monitor callbacks are arity 3 functions and can be specified as an function or
Expand Down Expand Up @@ -145,8 +148,7 @@ There are 2 reasons why I created this library

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `etop` to your list of dependencies in `mix.exs`:
The package can be installed by adding `:etop` to your list of dependencies in `mix.exs`:

```elixir
def deps do
Expand All @@ -156,14 +158,9 @@ def deps do
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/etop](https://hexdocs.pm/etop).

## License
## Copyright and License

`Etop` is Copyright (c) 2020-2021 E-MetroTel

The source code is released under the MIT License.

Check [LICENSE](LICENSE.md) for more information.
This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.
2 changes: 1 addition & 1 deletion lib/etop/chart.ex
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ defmodule Etop.Chart do
* height (20 default) - the height of the y axis
* width (100) - the width of the x axis
* y_label_postfix ("") - the appended y axis label
* title (nil) - Sting printed at the top of the chart
* title (nil) - String printed at the top of the chart
* labels (nil) - List of x-axis labels
* empty_char (0x20 - space) - the character for an empty char
* plot_char (?*) - the character for a plot point
Expand Down
37 changes: 24 additions & 13 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
defmodule Etop.MixProject do
use Mix.Project

@source_url "https://github.com/infinityoneframework/etop"
@version "0.7.0"

def project do
[
app: :etop,
version: "0.7.0",
version: @version,
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
name: "Etop",
deps: deps(),
package: package(),
docs: [
main: "Etop",
extras: ["README.md", "LICENSE.md"]
],
docs: docs(),
dialyzer: [
plt_add_deps: :app_tree
],
Expand All @@ -24,10 +24,7 @@ defmodule Etop.MixProject do
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
description: """
A Unix top like functionality for Elixir Applications.
"""
]
]
end

Expand All @@ -46,18 +43,32 @@ defmodule Etop.MixProject do
[
{:cpu_util, "~> 0.5"},
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false},
{:ex_doc, "~> 0.22.0", override: true, only: :dev, runtime: false},
{:ex_doc, ">= 0.0.0", override: true, only: :dev, runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false, override: true}
]
end

defp package do
[
description: "A Unix top like functionality for Elixir Applications.",
maintainers: ["Stephen Pallen"],
licenses: ["MIT"],
links: %{"Github" => "https://github.com/infinityoneframework/etop"},
files: ~w(lib README.md mix.exs LICENSE.md)
files: ~w(lib README.md mix.exs LICENSE.md),
links: %{"Github" => @source_url}
]
end

defp docs do
[
extras: [
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"]
],
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"]
]
end
end
7 changes: 4 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
"certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"},
"cpu_util": {:hex, :cpu_util, "0.5.1", "184b2ae00f372939eb387c5c6d92d8f68d54628d400a1ee681dff577d498545b", [:mix], [], "hexpm", "f169baef5572a4747da0f3f6bc8b185011bd23288fcacb631a8521f2c54cb6fd"},
"dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"},
"earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"},
"earmark_parser": {:hex, :earmark_parser, "1.4.16", "607709303e1d4e3e02f1444df0c821529af1c03b8578dfc81bb9cf64553d02b9", [:mix], [], "hexpm", "69fcf696168f5a274dd012e3e305027010658b2d1630cef68421d6baaeaccead"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.22.6", "0fb1e09a3e8b69af0ae94c8b4e4df36995d8c88d5ec7dbd35617929144b62c00", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "1e0aceda15faf71f1b0983165e6e7313be628a460e22a031e32913b98edbd638"},
"ex_doc": {:hex, :ex_doc, "0.25.3", "3edf6a0d70a39d2eafde030b8895501b1c93692effcbd21347296c18e47618ce", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "9ebebc2169ec732a38e9e779fd0418c9189b3ca93f4a676c961be6c1527913f5"},
"excoveralls": {:hex, :excoveralls, "0.13.3", "edc5f69218f84c2bf61b3609a22ddf1cec0fbf7d1ba79e59f4c16d42ea4347ed", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cc26f48d2f68666380b83d8aafda0fffc65dafcc8d8650358e0b61f6a99b1154"},
"file_system": {:hex, :file_system, "0.2.9", "545b9c9d502e8bfa71a5315fac2a923bd060fd9acb797fe6595f54b0f975fd32", [:mix], [], "hexpm", "3cf87a377fe1d93043adeec4889feacf594957226b4f19d5897096d6f61345d8"},
"hackney": {:hex, :hackney, "1.16.0", "5096ac8e823e3a441477b2d187e30dd3fff1a82991a806b2003845ce72ce2d84", [:rebar3], [{:certifi, "2.5.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.1", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.0", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.6", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm", "3bf0bebbd5d3092a3543b783bf065165fa5d3ad4b899b836810e513064134e18"},
"idna": {:hex, :idna, "6.0.1", "1d038fb2e7668ce41fbf681d2c45902e52b3cb9e9c77b55334353b222c2ee50c", [:rebar3], [{:unicode_util_compat, "0.5.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a02c8a1c4fd601215bb0b0324c8a6986749f807ce35f25449ec9e69758708122"},
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
"makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"},
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"},
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
"mix_test_watch": {:hex, :mix_test_watch, "1.0.2", "34900184cbbbc6b6ed616ed3a8ea9b791f9fd2088419352a6d3200525637f785", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}], "hexpm", "47ac558d8b06f684773972c6d04fcc15590abdb97aeb7666da19fcbfdc441a07"},
Expand Down