Commit Graph

1638 Commits

Author SHA1 Message Date
Pavol Vaskovic
5571b83353 [benchmark] Driver: log measurement metadata
Added --meta option to log measurement metadata:

* PAGES – number of memory pages used
* ICS – number of involuntary context switches
* YIELD – number of voluntary yields

(Pages and ICS were previously available only in --verbose mode.)
2019-07-23 17:40:45 +02:00
Michael Gottesman
2cf9f09e2c [benchmark][readme] Add docs on how to edit the benchmarks in xcode/build with swiftpm. 2019-07-19 09:43:32 -07:00
Michael Gottesman
4f37d6295f Merge pull request #26237 from gottesmm/pr-be50c5dbe2eb5925715fc34f31f6d6b8c1c9fb97
[benchmark] Refactor out how we specify benchmarks in Package.swift s…
2019-07-19 04:32:53 -07:00
Michael Gottesman
c6c81330ac [benchmark] Change the readme to consistently use the "#" heading form
We need this to use Heading 3+. Better to just standardize on that one
convention so we are consistent.
2019-07-18 23:19:40 -07:00
Michael Gottesman
dcb495d0db [benchmark] Refactor out how we specify benchmarks in Package.swift so downstream we can add additional source folders.
This is just a useful thing if one wants to have a separate folder of down
stream benchmarks. The code is written like this to hopefully prevent merge
conflicts from happening.
2019-07-18 23:19:28 -07:00
Scott Perry
3e2e4f8b6f Clean up the Diffing and Diffing.Myers benchmarks 2019-07-16 14:39:16 -07:00
David Smith
b06137b283 Add a private implementation of a String initializer with access to uninitialized storage (https://github.com/apple/swift-evolution/pull/1022) and use it to speed up uppercased() and lowercased() 2019-07-09 15:05:00 -07:00
Pavol Vaskovic
ec32140aed [benchmark] Run benchmarks using substring filters
Added support for running benchmarks using substring filters. Positional arguments prefixed with a single + or - sign are interpreted as benchmark name filters.

Excecutes all benchmarks whose names include any of the strings prefixed with a plus sign but none of the strings prefixed with a minus sign.
2019-07-07 11:59:45 +02:00
Pavol Vaskovic
ad24ca4ba6 [benchmark] Add min-sample argument to drivers
Support for gathering a minimal number of samples per benchmark, using the optional `--min-samples` argument, which overrides the automatically computed number of samples per `sample-time` if this is lower.
2019-07-07 10:13:26 +02:00
Pavol Vaskovic
f890cfb00f Merge pull request #25309 from Armenm/SR-10855-non-ascii-angryphonebook
[benchmark] SR-10855: Added non-ASCII characters to String benchmarking
2019-07-04 19:00:20 +02:00
Pavol Vaskovic
6c97101aa3 [benchmark] Cleaned up new AngryPhonebook tests
Clarified the naming of tests that exercise `_SmallString`s with `.Small` suffix and used plane name for regular String workloads.
Reordered declarations. Documented workload sizes.
2019-07-04 16:50:26 +02:00
Pavol Vaskovic
1d37b0092d [benchmark] Add AngryPhonebook.Strasse variant
Pathological case, uppercase: ß -> SS
2019-07-03 22:00:36 +02:00
Pavol Vaskovic
560cdca452 [benchmark] Large variants of new AngryPhonebook
Add case conversion benchmarks that operate on one large string (precomposed phonebook, comma separated names).
2019-07-03 18:49:51 +02:00
Pavol Vaskovic
878433eee6 [benchmark] Restore original run_AngryPhonebook 2019-07-03 17:47:51 +02:00
Keita Ito
b82f6c5f77 Remove benchmarks with largeLiteral
Per Michael's feedback (https://github.com/apple/swift/pull/25310#pullrequestreview-248466570), largeLiteral is likely redundant with largeManaged.
2019-07-01 23:18:03 -07:00
Scott Perry
f994fc3f80 Merge pull request #25808 from numist/numist/diffing-performance-master
Performance improvements and availability updates for Collection.difference(from:using:)
2019-07-01 14:20:07 -07:00
Pavol Vaskovic
5190db0acd [Gardening][benchmark] Import MSVCRT on Windows
Import functions from standard C library on Windows.
2019-07-01 16:11:55 +02:00
Keita Ito
4c0ea56e1b Add benchmarks for String.replaceSubrange(_:with:) with Repeated<Character> 2019-06-30 13:27:46 -07:00
Keita Ito
0de61f0e3d Add benchmarks for String.replaceSubrange(_:with:) with Array<Character> arguments 2019-06-30 12:15:43 -07:00
Pavol Vaskovic
7c951410f4 [Gardening] Remove extra Foundation imports
Remove the import of Foundation where it is not necessary for testing the ObjC interop.
2019-06-28 16:42:27 +02:00
Armen
0c4859fd2f Revert changes to existing benchmark 2019-06-27 23:06:15 -04:00
Scott Perry
0fc5d6ad31 Performance improvements and availability updates for Collection.difference(from:using:) 2019-06-26 16:55:29 -07:00
David Smith
acbb1ef7ee Add a benchmark for unicode Strings created via JSON decoding 2019-06-26 14:18:49 -07:00
Doug Gregor
78ef7e3222 Revert "Add a benchmark for unicode Strings created via JSON decoding" 2019-06-26 07:37:54 -07:00
Armen
4483e849ef SR-10855: Consistent test data and code refactor 2019-06-26 00:33:39 -04:00
David Smith
813b114aa2 Add a benchmark for unicode Strings created via JSON decoding 2019-06-25 21:19:26 -07:00
Armen
76bf39c3a4 Decreased the workload of benchmarks 2019-06-26 00:05:04 -04:00
Armen
d2255bdeab SR-10855: Added non-ASCII characters
Added Cyrillic and Armenian names with emojis
2019-06-26 00:05:04 -04:00
Keita Ito
082285f84e Reuse replaceSubrange(_:_:with:) function for benchmarks 2019-06-11 23:33:46 -07:00
Keita Ito
4d86f3fcf7 Rename benchmarks based on the benchmark naming convention
Reference: https://github.com/apple/swift/blob/master/benchmark/Naming.md
2019-06-11 01:37:39 -07:00
Keita Ito
459861b1d4 Rename ReplaceSubrange to StringReplaceSubrange 2019-06-11 00:03:21 -07:00
Keita Ito
e67c8b1fa0 Update ReplaceSubrange benchmark by adding Substring case 2019-06-07 17:55:57 -07:00
Keita Ito
0f6d56c9e6 Add ReplaceSubrange benchmark 2019-06-07 16:36:06 -07:00
Pavol Vaskovic
9706668e0a [benchmark] RandomIntegersLCG futureproofed
Allow for future change in algorithm that generates random integers in range.
2019-06-07 06:14:40 +02:00
Pavol Vaskovic
007d398f4a [Gardening] ReportFormatter: tying up loose ends 2019-05-24 00:18:44 +02:00
Pavol Vaskovic
b3f7996ea7 [benchmark] ReportFormatter: better inline headers
Improve inline headers in `single_table` mode to also print labels for the numeric columns.

Sections in the `single_table` are visually distinguished by a separator row preceding the the inline headers.

Separated header label styles for git and markdown modes with UPPERCASE and **Bold**  formatting respectively.

Inlined section template definitions.
2019-05-23 23:24:51 +02:00
Pavol Vaskovic
73b31006ee [benchmark] Fix help printing for run_smoke_bench 2019-05-23 21:40:44 +02:00
Pavol Vaskovic
9750581bf5 [benchmark] ReportFormatter: right-align num cols 2019-05-23 19:32:34 +02:00
Pavol Vaskovic
af7ef03aaf [benchmark] ReportFormatter: refactor header logic
Confine the logic for printing headers to the header function.
2019-05-23 17:28:21 +02:00
Pavol Vaskovic
a998e18e18 [benchmark] ReportFormatter: faster templating
It is slightly faster to simply concatenate strings that don’t require special formatting.
2019-05-23 12:29:19 +02:00
Pavol Vaskovic
49d25bfc51 [benchmark] ReportFomatter: de-tuple
Remove unnecessary list-to-tuple conversions.
2019-05-23 12:20:19 +02:00
Pavol Vaskovic
081e1c94a5 [benchmark] Add unit test for single table report 2019-05-22 14:54:00 +02:00
Pavol Vaskovic
da31b40e47 [benchmark] InsertCharacterStartIndex legacyFactor 2019-05-19 19:42:00 +02:00
Pavol Vaskovic
d76228b488 [benchmark] FrequenciesUsingReduce Legacy Factor 2019-05-19 19:41:59 +02:00
Johannes Weiss
53f5c5cbc1 Update NIOChannelPipeline.swift 2019-05-14 22:37:13 +01:00
Johannes Weiss
7226dca81f benchmark: NIOChannelPipeline imitation
adds a benchmark that imitates SwiftNIO's ChannelPipeline. Recently,
Swift master regressed on this benchmark, therefore I believe adding it
to Swift provides value as it seems to be different enough to the existing
benchmarks.
2019-05-14 21:03:03 +01:00
Pavol Vaskovic
81db10cdc9 [benchmark] Disable tests with overlong runtime
Temporarily disable benchmarks that run for too long without optimizations pending in set-on-fire branch.
2019-05-12 12:58:02 +02:00
Pavol Vaskovic
87e1efd1a2 Merge pull request #24156 from Gumichocopengin8/add-set-benchmarks
[benchmark] Variants for Set Sequence Methods
2019-05-12 12:34:19 +02:00
Pavol Vaskovic
07f373d965 [benchmark] Set.subtracting.Seq increased workload
The workload multipliers need to be increased in order to accommodate the pending improvements from `lorentey:set-on-fire`, so that these benchmark don't drop to under 20 μs runtimes when those optimizations kick in.

These multiplier will differ from those used on Set.subtracting.Set by a factor of 5.
2019-05-10 23:54:31 +02:00
Pavol Vaskovic
a75f2d7536 [benchmark] Set.Seq showcase optimized early exits 2019-05-10 22:54:01 +02:00