Skip to content

Commit 9420569

Browse files
vchuravyNHDaly
andcommitted
Add Project.toml andl minimal tests
Co-authored-by: Nathan Daly <[email protected]>
1 parent 088de38 commit 9420569

File tree

7 files changed

+31
-50
lines changed

7 files changed

+31
-50
lines changed

.travis.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@
22
language: julia
33
os:
44
- linux
5-
- osx
65
julia:
7-
- release
6+
- 1.3
7+
- 1.4
88
- nightly
99
notifications:
1010
email: false
11-
# uncomment the following lines to override the default test script
12-
#script:
13-
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
14-
# - julia -e 'Pkg.clone(pwd()); Pkg.build("LinuxPerf"); Pkg.test("LinuxPerf"; coverage=true)'
15-
after_success:
16-
# push coverage results to Coveralls
17-
- julia -e 'cd(Pkg.dir("LinuxPerf")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
18-
# push coverage results to Codecov
19-
- julia -e 'cd(Pkg.dir("LinuxPerf")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'

Project.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name = "LinuxPerf"
2+
uuid = "b4c46c6c-4fb0-484d-a11a-41bc3392d094"
3+
version = "0.1.0"
4+
5+
[deps]
6+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
7+
8+
[compat]
9+
julia = "1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia wrapper for linux's perf_event_open
1+
# LinuxPerf.jl -- Julia wrapper for Linux's perf
22

33
the kernel multiplexes event counter that requires limited hardware resources so some counters are only active for a fraction of the running time (% on the right).
44

REQUIRE

Lines changed: 0 additions & 1 deletion
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[deps]
2+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

test/runtests.jl

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
using LinuxPerf
2-
using Base.Test
2+
using Test
33

4-
# write your own tests here
5-
@test 1 == 2
4+
import LinuxPerf: make_bench, enable!, disable!, reset!, reasonable_defaults, counters
5+
const bench = make_bench(reasonable_defaults);
6+
@noinline function g(a)
7+
enable!(bench)
8+
c = 0
9+
for x in a
10+
if x > 0
11+
c += 1
12+
end
13+
end
14+
disable!(bench)
15+
c
16+
end
17+
g(zeros(10000))
18+
19+
counters(bench)

0 commit comments

Comments
 (0)