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

Configurable benchmarks output - Context #239

Open
OndrejSpanel opened this issue Jan 10, 2022 · 1 comment
Open

Configurable benchmarks output - Context #239

OndrejSpanel opened this issue Jan 10, 2022 · 1 comment

Comments

@OndrejSpanel
Copy link

Currently when I run benchmarks, my output contains header like:

::Benchmark xxxxxxx::
cores: 12
hostname: Xxxxx
name: Java HotSpot(TM) 64-Bit Server VM
osArch: amd64
osName: Windows 10
vendor: Oracle Corporation
version: 11.0.4+10-LTS
Parameters(pos -> Vector3(0,0,0)): 135.7683 ms

I am not interested seeing some of them (osArch, osName, vendor). Would it be possible to to suppress some Context fields in the test output?

@OndrejSpanel
Copy link
Author

OndrejSpanel commented Jan 10, 2022

The information is printed by LoggingReporter class by default. One can easily take its source and customize the header. Customized version might look like this:

      val machineKeys = result.context.properties.view.filterKeys(Context.machine.properties.keySet.contains).toSeq.sortBy(_._1)
      val ignore = Set("osArch", "osName", "vendor")
      for ((key, value) <- machineKeys if !ignore(key.name)) {
        log.report(s"$key: $value")
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant