Benchmarkdotnet: Implement `--list`

Created on 10 Oct 2018  Â·  5Comments  Â·  Source: dotnet/BenchmarkDotNet

Implement --list which is going to print all of the available full benchmark names that can be used for filtering.

Most helpful comment

It shouldn't be problem. I've seen similar feature here:
https://andrewlock.net/creating-an-ascii-art-tree-in-csharp/amp/

On Fri, Oct 12, 2018, 20:20 José Rivero notifications@github.com wrote:

You could have an option like this: --list-benchmarks:[flat|tree]

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/BenchmarkDotNet/issues/905#issuecomment-429415098,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQh-jx7qEc4BFEI_ArX1ZiU2lSV1NFdfks5ukN1UgaJpZM4XWH_H
.

All 5 comments

I would like to try to do it next week.

Can the display be a tree structure like, using namespace -> type -> method? In CoreFx there are more that thousand micro benchmarks, and a single/flat list would not be very helpful.
For example,
Instead of displaying:

System.Buffers.Binary.Tests.BinaryReadAndWriteTests.MeasureReverseEndianness
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.MeasureReverseUsingNtoH
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructAndReverseBE
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructAndReverseLE
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructFieldByFieldBE
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructFieldByFieldLE
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructFieldByFieldUsingBitConverterBE
System.Buffers.Binary.Tests.BinaryReadAndWriteTests.ReadStructFieldByFieldUsingBitConverterLE

You could display (option 1):

System.Buffers.Binary.Tests.BinaryReadAndWriteTests
  MeasureReverseEndianness
  MeasureReverseUsingNtoH
  ReadStructAndReverseBE
  ReadStructAndReverseLE
  ReadStructFieldByFieldBE
  ReadStructFieldByFieldLE
  ReadStructFieldByFieldUsingBitConverterBE
  ReadStructFieldByFieldUsingBitConverterLE

Or display names split to the namespace level as nodes can have more tests (option 2):

  Buffers
    Binary
      Tests
        BinaryReadAndWriteTests
          MeasureReverseEndianness
          MeasureReverseUsingNtoH
          ReadStructAndReverseBE
          ReadStructAndReverseLE
          ReadStructFieldByFieldBE
          ReadStructFieldByFieldLE
          ReadStructFieldByFieldUsingBitConverterBE
          ReadStructFieldByFieldUsingBitConverterLE

I like @jorive idea!

You could have an option like this: --list-benchmarks:[flat|tree]

It shouldn't be problem. I've seen similar feature here:
https://andrewlock.net/creating-an-ascii-art-tree-in-csharp/amp/

On Fri, Oct 12, 2018, 20:20 José Rivero notifications@github.com wrote:

You could have an option like this: --list-benchmarks:[flat|tree]

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dotnet/BenchmarkDotNet/issues/905#issuecomment-429415098,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQh-jx7qEc4BFEI_ArX1ZiU2lSV1NFdfks5ukN1UgaJpZM4XWH_H
.

Was this page helpful?
0 / 5 - 0 ratings