Skip to content

Commit

Permalink
release: 20220118 (bytedance#115)
Browse files Browse the repository at this point in the history
* release: 20210913 (bytedance#83) (bytedance#88)

* feat: circuitbreaker.panel use skipmap (bytedance#78)

* fix(metainfo): fix misuse of append (bytedance#79)

* fix(lscq): add write barrier for LSCQ Pointer (bytedance#80)

* feat(metainfo): improve backward APIs (bytedance#81)

* release: 20210913 (bytedance#83) (bytedance#93)

* feat: circuitbreaker.panel use skipmap (bytedance#78)

* fix(metainfo): fix misuse of append (bytedance#79)

* fix(lscq): add write barrier for LSCQ Pointer (bytedance#80)

* feat(metainfo): improve backward APIs (bytedance#81)

* chore(skipmap,skipset): remove duplicated code generation declaration (bytedance#87)

* fix(lscq): cas2 use runtime.noescape (bytedance#94)

* feat: add fastrand.Read() (bytedance#90)

Co-authored-by: liyichao <[email protected]>

* doc: add badge to link to godoc (bytedance#99)

* ci: skip golang related workflows when there are only doc changes (bytedance#101)

* ci: add workflow for feishu/lark notification (bytedance#100)

* ci: add workflow for feishu/lark notification

* ci: fix typo

* ci: also send feishu notification on issue opened

Co-authored-by: Jonathan Lu <[email protected]>

* feat(metainfo): define standard for backward prefix (bytedance#102)

* feat(fastrand): support Read,Shuffle,Perm (bytedance#103)

* feat(fastrand): Read remove temp buffer (bytedance#104)

* ci: add github workflow for performance regression check (bytedance#95)

* ci: add github workflow for performance regression check

Comment "/benchdiff" to trigger this check

* ci: add comments to pr-benchdiff.yml

* ci: report benchdiff result to PR_HEAD's check run

* ci: various changes

- support "pull_reqeust" event
- filter deleted go packages
- post a comment on job started
- post a comment on job failed

* ci: let xargs ignore empty line

* ci: skip benchdiff when there are only doc changes

* ci: set -x for debugging

* ci: make sure we are using github default branch as baseline

* ci: set benchtime=1s for benchdiff

* chore: add github issue forms (bytedance#105)

* test(lang/syncx): add benchmark for RWMutex (bytedance#89)

* fix(xxhash3): add fallback to fix panic occurs on non avx2, non sse2 machine (bytedance#108)

Co-authored-by: Ye Li <[email protected]>

* feat: add zset (bytedance#98)

* feat: add zset

* chore(zset): update comment

* docs(zset): add readme

* chore: some code style fixes

* chore(zset): rename Float64RangeOpt -> RangeOpt

* chore(zset): comment style fixes

* chore(zset): add a todo about maxLevel

* chore(zset): another comment fix

* chore(zset): move skiplist impl to another file

* chore(zset): add license header for opt.go

* chore: add myself as zset's CODEOWNER

* zset: don't use z.Range(0, z.Len()-1)

* doc: remove redundant section

* fix(zset): break when key is not exist

* chore(zset): simplify func name

* chore(zset): update cheatsheet

* chore(zset): meaningful const

* refactor(zset): optionalArray.init()

* docs: update zset readme

* docs(zset): also add @zhangyunhao116 as code owner

* docs(zset): some grammar fixes

* docs: fix docs typo (bytedance#109)

* feat: auto tuning gc (bytedance#112)

* feat: auto tuning gc

* doc: gctuner

* fix: gctuner tests data race (bytedance#113)

* fix: gctuner tests data race

* chore: add owner

* chore(ci): use self-hosted runner (bytedance#114)

* chore(ci): use self-hosted runner

* fix lint

Co-authored-by: Shengyu Zhang <[email protected]>
Co-authored-by: ziposcar <[email protected]>
Co-authored-by: liyichao <[email protected]>
Co-authored-by: Shengyu Zhang <[email protected]>
Co-authored-by: Jonathan Lu <[email protected]>
Co-authored-by: Pure White <[email protected]>
Co-authored-by: lyeeeeee <[email protected]>
Co-authored-by: Ye Li <[email protected]>
Co-authored-by: chyroc <[email protected]>
Co-authored-by: Joway <[email protected]>
Co-authored-by: Joway <[email protected]>
  • Loading branch information
12 people authored Jan 18, 2022
2 parents 3d9fa9c + 3e42f75 commit 3db8757
Show file tree
Hide file tree
Showing 51 changed files with 2,982 additions and 91 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/collection/hashset @lyeeeeee @PureWhiteWu
/collection/skipmap @zhangyunhao116 @PureWhiteWu
/collection/skipset @zhangyunhao116 @PureWhiteWu
/collection/zset @SilverRainZ @zhangyunhao116

# lang code owners
/lang/fastrand @zhangyunhao116 @PureWhiteWu
Expand All @@ -23,3 +24,4 @@
/util/gopool @PureWhiteWu @zhangyunhao116
/util/logger @PureWhiteWu @zhangyunhao116
/util/xxhash3 @lyeeeeee
/util/gctuner @joway
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "Example: Debian GNU/Linux 9 (stretch)"
validations:
required: true
- type: input
attributes:
label: Go Version
description: What version of golang are you using?
placeholder: "Example: go1.16.5 linux/amd64"
validations:
required: true
- type: input
attributes:
label: Package Version
description: What version of bytedance/gopkg are you using?
placeholder: "Example: 20210913/main/develop"
validations:
required: true

- type: textarea
attributes:
label: Affected Packages
description: Which packages are affected by this issue?
placeholder: |
One package per line, for example:
- lang/fastrand
- collection/skipset
- ...
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: What actually happened?
validations:
required: true
- type: textarea
attributes:
label: Reproduction Steps
description: How do you trigger this bug? Please walk us through it step by step.
placeholder: |
1.
2.
3.
...
validations:
required: true

- type: textarea
attributes:
label: Other Information
description: Do you still need to add any information?
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Security Bug Report
url: https://github.com/bytedance/gopkg/blob/develop/CONTRIBUTING.md#3-security-bugs
about: |
Please do not report the safe disclosure of bugs to public issues.
Contact us by email ([email protected])
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_reqeust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reference: https://github.com/jekyll/jekyll/blob/master/.github/ISSUE_TEMPLATE/feature_request.md

name: Feature Request
description: File a feature request
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: textarea
attributes:
label: Summary
description: Please give a one-paragraph explanation of the feature.
validations:
required: true

- type: textarea
attributes:
label: Motivation
description: Why do you want to see this feature?
validations:
required: true

- type: textarea
attributes:
label: Explanation
description: |
Please explain the proposal as if it was already included in the project and you
were teaching it to another programmer. That generally means:
- Introducing new named concepts.
- Explaining the feature largely in terms of examples.
- If applicable, provide sample error messages, deprecation warnings, or
migration guidance.
*If this is a small feature, you may omit this section.*
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Question
description: Ask a question
labels: ["question"]
body:
- type: textarea
attributes:
label: Question
description: What do you want to know?
validations:
required: true
8 changes: 6 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ name: "CodeQL"
on:
push:
branches: [ develop, main ]
paths-ignore:
- '**.md'
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
paths-ignore:
- '**.md'
schedule:
- cron: '35 21 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
actions: read
contents: read
Expand All @@ -44,7 +48,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- uses: actions/cache@v2
with:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/feishu-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Feishu Notification

on:
pull_request:
types: [opened]
issues:
types: [opened]

jobs:
pr-opened:
name: Pull Request Opened Notification
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
runs-on: self-hosted
steps:
- name: Send Feishu Message
env:
ACTIONS_FEISHU_TAG: v1.3.1
INPUT_WEBHOOK: ${{ secrets.FEISHU_ROBOT_WEBHOOK_URL }}
INPUT_MESSAGE_TYPE: post
INPUT_TITLE: New Pull Request
INPUT_CONTENT: |
@${{ github.event.pull_request.user.login }} opened pull request #${{ github.event.pull_request.number }}:
${{ github.event.pull_request.title }}
See: https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}
run: |
wget -q https://github.com/xiachufang/actions-feishu/releases/download/${{ env.ACTIONS_FEISHU_TAG }}/linux-amd64-actions-feishu.tar.gz
tar zxf linux-amd64-actions-feishu.tar.gz feishu
./feishu
issues-opened:
name: Issue Opened Notification
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
runs-on: ubuntu-latest
steps:
- name: Send Feishu Message
env:
ACTIONS_FEISHU_TAG: v1.3.1
INPUT_WEBHOOK: ${{ secrets.FEISHU_ROBOT_WEBHOOK_URL }}
INPUT_MESSAGE_TYPE: post
INPUT_TITLE: New Issue
INPUT_CONTENT: |
@${{ github.event.issue.user.login }} opened issues #${{ github.event.issue.number }}:
${{ github.event.issue.title }}
See: https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}
run: |
wget -q https://github.com/xiachufang/actions-feishu/releases/download/${{ env.ACTIONS_FEISHU_TAG }}/linux-amd64-actions-feishu.tar.gz
tar zxf linux-amd64-actions-feishu.tar.gz feishu
./feishu
147 changes: 147 additions & 0 deletions .github/workflows/pr-benchdiff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: Benchdiff

on:
issue_comment:
types: [created]
pull_request:
types: [opened]
paths-ignore:
- '**.md'

jobs:
# https://github.community/t/cancelling-rest-of-job-if-condition-is-met/18181
trigger:
name: Pull request comment trigger
outputs:
triggered: ${{ steps.output.outputs.triggered }}
pr_number: ${{ steps.output.outputs.pr_number }}
runs-on: self-hosted
steps:
- name: Check pull request comment
if: ${{ github.event_name == 'issue_comment' }}
uses: khan/pull-request-comment-trigger@master
id: check-comment
with:
trigger: '/benchdiff'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Set output
id: output
run: |
echo '::set-output name=triggered::${{ github.event_name == 'pull_request' || steps.check-comment.outputs.triggered }}'
echo '::set-output name=pr_number::${{ github.event.pull_request.number || github.event.issue.number }}'
benchdiff:
name: Performance regression check
needs: [trigger]
if: needs.trigger.outputs.triggered == 'true'
runs-on: self-hosted
env:
# In markdown URL syntax
RUNS_URL: '[${{ github.workflow }} #${{ github.run_number }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
steps:
- name: Report job start
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: '${{ needs.trigger.outputs.pr_number }}'
body: |
## Benchdiff
Runs: ${{ env.RUNS_URL }}
Job is started.
- name: Checkout
uses: actions/checkout@v2
- name: Checkout pull request HEAD
id: head
run: |
# Fetch github default branch as baseline
git fetch origin ${{ github.event.repository.default_branch }}:BENCHDIFF_BASE
git checkout BENCHDIFF_BASE
echo "::set-output name=base::$(git rev-parse HEAD)"
# Checkout HEAD of pull request and set its sha to step output
git fetch origin pull/${{ needs.trigger.outputs.pr_number }}/head:BENCHDIFF_HEAD
git checkout BENCHDIFF_HEAD
echo "::set-output name=head::$(git rev-parse HEAD)"
set -x
# Set modified packages to step output
# git diff: get difference between HEAD and baseline
# grep: filter non-go files
# xargs -r: --no-run-if-empty, ignore empty line
# xargs dirname: keep only the directory name (go packages)
# xargs ls: filter non-exist files
# sort | uniq: dedup
pkgs=$(git diff --name-only BENCHDIFF_BASE | grep '.go$' | xargs -r dirname | xargs -r ls -d 2>/dev/null | sort | uniq)
if [ ! -z "${pkgs}" ]; then
# awk: Add "./" prefix to let `go test` known they are relative paths
# tr: join paths to one line, otherwise benchdiff cannot recognize it
pkgs=$(echo "${pkgs}" | awk '{print "./" $0}' | tr '\n' ' ')
fi
echo "::set-output name=pkgs::${pkgs}"
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Benchdiff
uses: WillAbides/[email protected]
id: diff
if: steps.head.outputs.pkgs != ''
with:
benchdiff_version: 0.7.1
status_sha: ${{ steps.head.outputs.head }}
status_name: Benchdiff result
status_on_degraded: neutral
benchdiff_args: |
--cpu=4
--packages="${{ steps.head.outputs.pkgs }}"
--count=10
--warmup-count=1
--benchtime=1s
--benchmem
--tolerance=50
--base-ref=${{ steps.head.outputs.base }}
--debug
- name: Report benchdiff result via comment
uses: peter-evans/create-or-update-comment@v1
if: steps.head.outputs.pkgs != ''
with:
issue-number: '${{ needs.trigger.outputs.pr_number }}'
body: |
## Benchdiff
Command: `${{ steps.diff.outputs.bench_command }}`
HEAD: ${{ steps.diff.outputs.head_sha }}
Base: ${{ steps.diff.outputs.base_sha }}
Runs: ${{ env.RUNS_URL }}
Degraded: ${{ steps.diff.outputs.degraded_result }}
<details>
<summary>Results</summary>
${{ steps.diff.outputs.benchstat_output }}
</details>
- name: On skipped
uses: peter-evans/create-or-update-comment@v1
if: steps.head.outputs.pkgs == ''
with:
issue-number: '${{ needs.trigger.outputs.pr_number }}'
body: |
## Benchdiff
Runs: ${{ env.RUNS_URL }}
There is no package to bench.
- name: On failure
uses: peter-evans/create-or-update-comment@v1
if: ${{ failure() }}
with:
issue-number: '${{ needs.trigger.outputs.pr_number }}'
body: |
## Benchdiff
Runs: ${{ env.RUNS_URL }}
Job is failed.
Loading

0 comments on commit 3db8757

Please sign in to comment.