Skip to content

Commit d8768f2

Browse files
Support Documentation
1 parent 8c52cf7 commit d8768f2

File tree

6 files changed

+47
-2
lines changed

6 files changed

+47
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Manifest.toml
2+
docs/build

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# [TerminalSystemMonitor.jl](https://github.com/AtelierArith/TerminalSystemMonitor.jl)
22

3+
[![Build Status](https://github.com/AtelierArith/TerminalSystemMonitor.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/AtelierArith/TerminalSystemMonitor.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://AtelierArith.github.io/TerminalSystemMonitor.jl/stable/) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://AtelierArith.github.io/TerminalSystemMonitor.jl/dev/)
4+
35
## Description
46

57
This Julia package displays CPU and RAM usage information on your computer. If necessary, one can show GPU usage.

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
TerminalSystemMonitor = "bd0a793d-05ca-4aa9-be12-7c4786d45f63"

docs/make.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using TerminalSystemMonitor
2+
using Documenter
3+
4+
DocMeta.setdocmeta!(TerminalSystemMonitor, :DocTestSetup, :(using TerminalSystemMonitor); recursive=true)
5+
6+
makedocs(;
7+
modules=[TerminalSystemMonitor],
8+
authors="Satoshi Terasaki <[email protected]> and contributors",
9+
sitename="TerminalSystemMonitor.jl",
10+
format=Documenter.HTML(;
11+
canonical="https://atelierarith.github.io/TerminalSystemMonitor.jl",
12+
edit_link="main",
13+
assets=String[],
14+
),
15+
pages=[
16+
"Home" => "index.md",
17+
],
18+
)
19+
20+
deploydocs(;
21+
repo="github.com/AtelierArith/TerminalSystemMonitor.jl",
22+
devbranch="main",
23+
)

docs/src/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```@meta
2+
CurrentModule = TerminalSystemMonitor
3+
```
4+
5+
# TerminalSystemMonitor
6+
7+
Documentation for [TerminalSystemMonitor](https://github.com/terasakisatoshi/TerminalSystemMonitor.jl).
8+
9+
```@index
10+
```
11+
12+
```@autodocs
13+
Modules = [TerminalSystemMonitor]
14+
```

src/TerminalSystemMonitor.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import Term # this is required by UnicodePlots.panel
66
using MLDataDevices: MLDataDevices, CUDADevice
77

88
# Define dummy method to avoid getting errors on testing using JET.jl
9-
function plot_gpu_utilization_rates(::Type{CUDADevice}, dummyargs=nothing)::Vector{Any}
9+
function plot_gpu_utilization_rates(::Type{CUDADevice}, dummyargs=nothing)::Vector{Any}
1010
Any[]
1111
end
1212

1313
# Define dummy method to avoid getting errors on testing using JET.jl
14-
function plot_gpu_memory_utilization(::Type{CUDADevice}, dummyargs=nothing)::Vector{Any}
14+
function plot_gpu_memory_utilization(::Type{CUDADevice}, dummyargs=nothing)::Vector{Any}
1515
Any[]
1616
end
1717

@@ -25,7 +25,9 @@ busy_time(info::Sys.CPUinfo) = Int64(
2525
get_cpu_percent(period)
2626
2727
CPU usage between 0.0 and 100 [percent]
28+
2829
The idea is borrowed from https://discourse.julialang.org/t/get-cpu-usage/24468/7
30+
2931
Thank you @fonsp.
3032
"""
3133
function get_cpu_percent(period::Real = 1.0)

0 commit comments

Comments
 (0)