Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TFSec outputs the same results multiple times #237

Merged
merged 2 commits into from
Oct 14, 2021

Commits on Oct 1, 2021

  1. fix: TFSec outputs the same results multiple times

    Not affects perfomance.
    
    200 runs '`terraform_tfsec` (master):'
    
    | time command   | max    | min    | mean     | median |
    | -------------- | ------ | ------ | -------- | ------ |
    | users seconds  | 3.96 | 1.95 | 2.4316 | 2.38 |
    | system seconds | 1.69 | 0.67 | 1.08535 | 1.03 |
    | CPU %          | 105 | 2 | 62.11 | 75 |
    | Total time     | 142.06 | 3.36 | 9.272 | 5.335 |
    
    <details><summary>Run details</summary>
    
    * Test Start: Fri Oct  1 16:17:58 UTC 2021
    * Test End: Fri Oct  1 16:48:55 UTC 2021
    
    | Variable name                | Value |
    | ---------------------------- | --- |
    | `TEST_NUM`                   | <code>200</code> |
    | `TEST_COMMAND`               | <code>pre-commit try-repo -a /mnt/c/Users/vm/code/open-source/pre-commit-terraform terraform_tfsec</code> |
    | `TEST_DIR`                   | <code>/mnt/c/Users/vm/code/Star/Oslo/infrastructure</code> |
    | `TEST_DESCRIPTION`           | <code>200 runs '`terraform_tfsec` (master):'</code> |
    | `RAW_TEST_RESULTS_FILE_NAME` | <code>terraform_tfsec_196</code> |
    
    Memory info (`head -n 6 /proc/meminfo`):
    
    ```bash
    MemTotal:       12765352 kB
    MemFree:         7222588 kB
    MemAvailable:    9813008 kB
    Buffers:          472812 kB
    Cached:          2179164 kB
    SwapCached:            0 kB
    ```
    
    CPU info:
    
    ```bash
    Real procs: 6
    Virtual (hyper-threading) procs: 12
    
    processor	: 11
    vendor_id	: GenuineIntel
    cpu family	: 6
    model		: 165
    model name	: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
    stepping	: 2
    microcode	: 0xffffffff
    cpu MHz		: 2712.009
    cache size	: 12288 KB
    physical id	: 0
    siblings	: 12
    core id		: 5
    cpu cores	: 6
    apicid		: 11
    initial apicid	: 11
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 21
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves flush_l1d arch_capabilities
    bugs		: spectre_v1 spectre_v2 spec_store_bypass swapgs itlb_multihit
    bogomips	: 5424.01
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 39 bits physical, 48 bits virtual
    power management:
    ```
    
    </details>
    
    200 runs '`terraform_tfsec` (master) with `require_serial: true`:'
    
    | time command   | max    | min    | mean     | median |
    | -------------- | ------ | ------ | -------- | ------ |
    | users seconds  | 1.33 | 0.87 | 1.0723 | 1.07 |
    | system seconds | 0.86 | 0.32 | 0.6099 | 0.605 |
    | CPU %          | 36 | 28 | 33.77 | 34 |
    | Total time     | 6.33 | 4.39 | 4.9339 | 4.865 |
    
    <details><summary>Run details</summary>
    
    * Test Start: Fri Oct  1 16:49:29 UTC 2021
    * Test End: Fri Oct  1 17:05:58 UTC 2021
    
    | Variable name                | Value |
    | ---------------------------- | --- |
    | `TEST_NUM`                   | <code>200</code> |
    | `TEST_COMMAND`               | <code>pre-commit try-repo -a /mnt/c/Users/vm/code/open-source/pre-commit-terraform terraform_tfsec</code> |
    | `TEST_DIR`                   | <code>/mnt/c/Users/vm/code/Star/Oslo/infrastructure</code> |
    | `TEST_DESCRIPTION`           | <code>200 runs '`terraform_tfsec` (master):'</code> |
    | `RAW_TEST_RESULTS_FILE_NAME` | <code>terraform_tfsec_196_with_serial</code> |
    
    Memory info (`head -n 6 /proc/meminfo`):
    
    ```bash
    MemTotal:       12765352 kB
    MemFree:         7225740 kB
    MemAvailable:    9826636 kB
    Buffers:          482272 kB
    Cached:          2179152 kB
    SwapCached:            0 kB
    ```
    
    CPU info:
    
    ```bash
    Real procs: 6
    Virtual (hyper-threading) procs: 12
    
    processor	: 11
    vendor_id	: GenuineIntel
    cpu family	: 6
    model		: 165
    model name	: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
    stepping	: 2
    microcode	: 0xffffffff
    cpu MHz		: 2712.009
    cache size	: 12288 KB
    physical id	: 0
    siblings	: 12
    core id		: 5
    cpu cores	: 6
    apicid		: 11
    initial apicid	: 11
    fpu		: yes
    fpu_exception	: yes
    cpuid level	: 21
    wp		: yes
    flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves flush_l1d arch_capabilities
    bugs		: spectre_v1 spectre_v2 spec_store_bypass swapgs itlb_multihit
    bogomips	: 5424.01
    clflush size	: 64
    cache_alignment	: 64
    address sizes	: 39 bits physical, 48 bits virtual
    power management:
    ```
    
    </details>
    MaxymVlasov committed Oct 1, 2021
    Configuration menu
    Copy the full SHA
    6585cdf View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. fix: pass all files in the array instead of just the first element

    Co-authored-by: Narek Kazarian <nkazarian@spokeo.com>
    MaxymVlasov and nkazarian-spokeo committed Oct 14, 2021
    Configuration menu
    Copy the full SHA
    c14ea5c View commit details
    Browse the repository at this point in the history