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

Multi-format reports #35

Merged
merged 4 commits into from Mar 7, 2021
Merged

Conversation

whyoleg
Copy link
Contributor

@whyoleg whyoleg commented Feb 20, 2021

  • CSV/SCSV/TEXT JMH-similar formatter for JS/Native
  • possibility to select format from gradle plugin
  • fixes Support CSV result format #34
  • printing summary after suite execution on all platforms

@whyoleg
Copy link
Contributor Author

whyoleg commented Feb 20, 2021

@qurbonzoda Hey, can you check, if the way it's implemented will fit current state of kx.benchmark?
Also, I see, that there is a PR #32 with better K/N support, which will conflict in several places. Will it be better to rebase it just now over that branch?

There is almost no tests for any of functionality, so what is the best way to test the implementation, only publish to maven-local and use it? Or may be you can suggest me something else?

Implement JMH-similar JS/Native CSV/SCSV/TEXT formatters
Print summary after suite execution on all platforms
@whyoleg whyoleg changed the title WIP implement different report formats Multi-format reports Feb 21, 2021
@whyoleg
Copy link
Contributor Author

whyoleg commented Feb 21, 2021

PR is ready for review.
Also, implementing of Text format, allowed to print summary of executed benchmarks after every suite (jvm/js/native/etc).

image

@whyoleg whyoleg marked this pull request as ready for review February 21, 2021 22:16
@qurbonzoda qurbonzoda self-assigned this Feb 25, 2021
@whyoleg
Copy link
Contributor Author

whyoleg commented Mar 3, 2021

Any news on PR review?

@qurbonzoda
Copy link
Collaborator

There is almost no tests for any of functionality, so what is the best way to test the implementation, only publish to maven-local and use it?

There is :examples subproject containing different use cases. You can add a benchmark configuration to :examples:kotlin-multiplatform, e.g.

benchmark {
    configurations {
        ...

        csvReport {
            ...
            reportFormat = "csv"
        }
    }

Currently the project doesn't have a more comprehensive testing infrastructure to test output of a benchmark with given configuration.
But contributions are always welcome.

@qurbonzoda
Copy link
Collaborator

Also, I see, that there is a PR #32 with better K/N support, which will conflict in several places. Will it be better to rebase it just now over that branch?

I'm not sure about when that PR will be merged to master. Better to sit on master for now, maybe this PR will get merged first.

@whyoleg
Copy link
Contributor Author

whyoleg commented Mar 4, 2021

regarding test infra: why is the plugin being used as an included build? is it required, or can be changed to ordinary module? It will simplify gradle plugin test setup (mainly runtime classpaths resolving)
Nevermind, it should ok with included build

@qurbonzoda
Copy link
Collaborator

Great job!
Let's resolve the remained comments and merge it.

@whyoleg whyoleg mentioned this pull request Mar 5, 2021
@whyoleg
Copy link
Contributor Author

whyoleg commented Mar 5, 2021

Currently the project doesn't have a more comprehensive testing infrastructure to test output of a benchmark with given configuration.
But contributions are always welcome.

take a look #37 :)

first = false
names.takeWhile { it.toLowerCase() == it }
} else {
val common = prefix.zip(names).takeWhile { (p, n) -> p == n && n.toLowerCase() == n }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: n.toLowerCase() == n is redundant. If prefix already meets p.toLowerCase() == p, and p == n, then n.toLowerCase() == n is true

@qurbonzoda qurbonzoda merged commit ed69605 into Kotlin:master Mar 7, 2021
@whyoleg whyoleg deleted the multi-format-support branch March 24, 2021 13:00
@OliverO2
Copy link

@qurbonzoda Looks like an awesome step forward. Would you mind putting out a new release for this?

@qurbonzoda
Copy link
Collaborator

qurbonzoda commented Apr 27, 2021

@OliverO2 We will publish a new release in the coming weeks with Kotlin 1.5.

@qurbonzoda
Copy link
Collaborator

qurbonzoda commented Apr 30, 2021

@OliverO2 A new release with multiple report formats is published. The Kotlin version remains 1.4.30

@OliverO2
Copy link

@qurbonzoda Excellent! Thanks for pinging. Will try.

@OliverO2
Copy link

Can confirm that reportFormat = "csv" and reportFormat = "text" works with Kotlin version 1.4.32.

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

Successfully merging this pull request may close these issues.

Support CSV result format
3 participants