diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d5f9b2..df079dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,3 +46,12 @@ jobs: -e PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/home/vscode/go/bin:/workspace/bin \ ci \ neon -props "{tag: ${CI_ACTION_REF_NAME}, MODULE: github.com/${CI_REPOSITORY,,}, BY: ${CI_ACTOR}}" test-int + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: "go" + output-file-path: bin/benchstats.txt + github-token: ${{ secrets.GITHUB_TOKEN }} + auto-push: ${{ env.CI_REF_NAME == 'main' }} + fail-on-alert: true diff --git a/.gitignore b/.gitignore index 0e157d0..0fa3d7c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ testdata/benchmark/**/*.yaml test/suites/cli/rimo.schema.json test/suites/testdata/data1/output/data.yaml +test/suites/testdata/data1/output/data.yaml diff --git a/build.yml b/build.yml index ac2345f..cfe74c0 100644 --- a/build.yml +++ b/build.yml @@ -237,7 +237,7 @@ targets: doc: "Run all benchmarks" depends: ["info", "refresh", "lint", "bench-data"] steps: - - $: go test -bench=. -benchmem -coverprofile=./={BUILD_DIR}/coverage_benchmark.txt -covermode=atomic ./... + - $: go test -bench=. -benchmem ./... -run=^# -benchtime=1s | tee ./={BUILD_DIR}/benchstats.txt test: doc: "Run all tests with coverage" diff --git a/test/suites/testdata/data1/output/.gitkeep b/test/suites/testdata/data1/output/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/suites/testdata/data1/output/data.yaml b/test/suites/testdata/data1/output/data.yaml deleted file mode 100644 index 1bb32f7..0000000 --- a/test/suites/testdata/data1/output/data.yaml +++ /dev/null @@ -1,144 +0,0 @@ -database: data -tables: - - name: input - columns: - - name: address - type: string - concept: "" - constraint: [] - confidential: null - mainMetric: - count: 10 - empty: 0 - unique: 10 - sample: - - PSC 4713, Box 9649 APO AA 43433 - - 9038 Frye Ramp South Cheryltown, CT 54262 - - 25545 Cole Court Newtonfurt, KY 13882 - - 06210 David Court South Kimberly, IL 10236 - - 536 Robinson Estates Austinside, NV 69535 - stringMetric: - mostFrequentLen: - - length: 42 - freq: 0.3 - sample: - - 06210 David Court South Kimberly, IL 10236 - - 0301 Amy Grove Apt. 325 Janefort, MA 84102 - - 095 Jennifer Turnpike Castrobury, NY 98111 - - length: 41 - freq: 0.2 - sample: - - 536 Robinson Estates Austinside, NV 69535 - - 9038 Frye Ramp South Cheryltown, CT 54262 - - length: 31 - freq: 0.1 - sample: - - PSC 4713, Box 9649 APO AA 43433 - - length: 37 - freq: 0.1 - sample: - - 25545 Cole Court Newtonfurt, KY 13882 - leastFrequentLen: - - length: 52 - freq: 0.1 - sample: - - 275 Stone Ridges Suite 885 East Aliciafurt, MH 15407 - - length: 45 - freq: 0.1 - sample: - - 2035 Simmons Islands Heatherchester, IN 46152 - - length: 43 - freq: 0.1 - sample: - - 38432 Moreno Turnpike Garrettland, TN 72939 - - name: age - type: numeric - concept: "" - constraint: [] - confidential: null - mainMetric: - count: 10 - empty: 0 - unique: 9 - sample: - - 35 - - 73 - - 73 - - 80 - - 73 - numericMetric: - min: 29 - max: 95 - mean: 57.7 - - name: date - type: string - concept: "" - constraint: [] - confidential: null - mainMetric: - count: 10 - empty: 0 - unique: 10 - sample: - - "2003-10-11" - - "2022-04-23" - - "2001-08-23" - - "2001-08-23" - - "2003-10-11" - stringMetric: - mostFrequentLen: - - length: 10 - freq: 1 - sample: - - "2022-04-23" - - "2004-07-04" - - "2004-07-04" - - "2005-05-10" - - "2014-07-24" - leastFrequentLen: [] - - name: phone - type: string - concept: "" - constraint: [] - confidential: null - mainMetric: - count: 10 - empty: 0 - unique: 10 - sample: - - 001-845-854-2110 - - +1-407-997-8293x68130 - - (517)819-3454 - - 001-845-854-2110 - - 260-587-0590 - stringMetric: - mostFrequentLen: - - length: 16 - freq: 0.4 - sample: - - 001-845-854-2110 - - 001-533-758-7269 - - 001-958-985-3039 - - 001-866-271-0116 - - length: 12 - freq: 0.2 - sample: - - 828-755-3826 - - 260-587-0590 - - length: 10 - freq: 0.1 - sample: - - "7795418893" - leastFrequentLen: - - length: 21 - freq: 0.1 - sample: - - +1-407-997-8293x68130 - - length: 18 - freq: 0.1 - sample: - - (330)616-7639x7810 - - length: 13 - freq: 0.1 - sample: - - (517)819-3454