Skip to content

Commit

Permalink
Merge pull request #14 from max-au/max-au/erlperf-20
Browse files Browse the repository at this point in the history
erlperf 2.0: total rewrite
  • Loading branch information
max-au authored Apr 9, 2022
2 parents 5a1c59e + cc4d793 commit 713f167
Show file tree
Hide file tree
Showing 39 changed files with 2,647 additions and 3,347 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
otp_version: ['22', '23', '24']
otp_version: ['23', '24']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp_version}}
rebar3-version: '3.17.0'
- name: Compile
run: rebar3 compile
- name: Run tests
run: rebar3 do edoc,ct
run: rebar3 ct
- name: Generate documentation
run: rebar3 edoc
- shell: bash
name: Dialyzer
run: rebar3 dialyzer
- shell: bash
name: Escriptize
run: rebar3 as prod escriptize
- shell: bash
name: Smoke test
run: ./erlperf 'timer:sleep(1).'
40 changes: 40 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
stages:
- test
- deploy

test-default-docker:
tags:
- linux
- x86_64
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/erlang:latest
stage: test
script:
- rebar3 compile
- rebar3 edoc
- rebar3 dialyzer
- rebar3 ct
- rebar3 as prod escriptize
- ./erlperf 'timer:sleep(1).'
after_script:
- mv "_build/test/logs" ./public
artifacts:
when: always
paths:
- "./public"
expire_in: 3 days
reports:
junit:
- "./public/last/junit_report.xml"

# Pages: publishing Common Test results
pages:
stage: deploy
needs:
- test-default-docker
script:
- echo "Uploading to pages"
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
32 changes: 32 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

## 2.0
- incompatible change: `erlperf` requires runner arity to be defined explicitly.
Code example: `erlperf:run(#{runner => {timer, sleep, []}, init_runner => "1."})`,
with `erlperf` making a guess that `init_runner` is defined, therefore its return
value can be passed as the argument to `timer:sleep/1`. This behaviour was confusing
and is no longer supported.
- incompatible change: crashed runner causes entire job to stop (error contains the
reason and stack trace)
- incompatible change: removed fprof/profiling support in favour of JIT + `perf`
- `erlperf` application is no longer required to be started for one-off benchmark runs

## 1.1.5:
- support for OTP 25 (peer replacing slave)

## 1.1.4:
- fixed an issue with pg already started
- moved profiling to spawned process

## 1.1.3:
- addressed deprecation, updated to argparse 1.1.4

## 1.1.2:
- updated command line parser to new argparse

## 1.1.1:
- added support for OTP 24
- added edoc documentation

## 1.0.0:
- initial release
Loading

0 comments on commit 713f167

Please sign in to comment.