mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: GlobMatcher uses now reflex::Matcher regex engine (#4528)
Also consolidate benchmarking low level routines undeer dfly_core_test ``` BM_ParseFastFloat 707 ns 707 ns 4005656 BM_ParseDoubleAbsl 1460 ns 1460 ns 1927158 BM_MatchGlob/1000 121 ns 121 ns 23701780 BM_MatchGlob/10000 512 ns 512 ns 5481405 BM_MatchFindSubstr/1000 123 ns 123 ns 31114255 BM_MatchFindSubstr/10000 1126 ns 1126 ns 2522019 BM_MatchReflexFind/1000 118 ns 118 ns 22442417 BM_MatchReflexFind/10000 512 ns 512 ns 5414329 BM_MatchReflexFindStar/1000 106 ns 106 ns 26276727 BM_MatchReflexFindStar/10000 717 ns 717 ns 3719605 BM_MatchStd/1000 19782 ns 19779 ns 128020 BM_MatchStd/10000 199809 ns 199781 ns 13837 BM_MatchRedisGlob/1000 1601 ns 1601 ns 1754635 BM_MatchRedisGlob/10000 16494 ns 16493 ns 171585 BM_MatchRe2/1000 1039 ns 1039 ns 2709486 BM_MatchRe2/10000 10041 ns 10040 ns 281296 ``` What's curious is that now matching `*foobar*` on string is faster than searching for 'foobar` using string::find() (BM_MatchGlob vs BM_MatchFindSubstr) Improvement vs Redis is 10-30 times faster (BM_MatchRedisGlob vs BM_MatchGlob). Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
a40b5063e2
commit
6d1c22b64c
9 changed files with 364 additions and 222 deletions
73
.github/workflows/scorecard.yml
vendored
73
.github/workflows/scorecard.yml
vendored
|
@ -1,73 +0,0 @@
|
|||
# This workflow uses actions that are not certified by GitHub. They are provided
|
||||
# by a third-party and are governed by separate terms of service, privacy
|
||||
# policy, and support documentation.
|
||||
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '43 4 * * 1'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecard on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard (optional).
|
||||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
Loading…
Add table
Add a link
Reference in a new issue