Commit graph

8 commits

Author SHA1 Message Date
Jonas Olsson
97d84ef78e Add support for lists to the FieldTrialParser.
List elements are separated by a |. If the key is given without a : we
treat that as a empty list.

We also support parsing multiple lists as a list-of-structs, see the
unit test for usage examples.

Bug: webrtc:9346
Change-Id: I32d3ce612fef476b1c481c00a893d7fa2f339e92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130464
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27560}
2019-04-11 11:15:26 +00:00
Sebastian Jansson
d69998aa5c Adds support for empty key fields in field trial parser.
Bug: webrtc:9346
Change-Id: I16e068340d3d48b983270af0c481ed538632e148
Reviewed-on: https://webrtc-review.googlesource.com/c/115241
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26070}
2018-12-20 13:03:01 +00:00
Sebastian Jansson
b22f077a60 Adds FieldTrialConstrained class.
Bug: webrtc:9346
Change-Id: I8ac232f012cae1d1bd9d862a572aba82bb8ca031
Reviewed-on: https://webrtc-review.googlesource.com/c/111255
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25700}
2018-11-19 17:21:55 +00:00
Sebastian Jansson
ec76466da2 Adds % unit to float field trial parser.
This can improve readability in some situations and prevents the need
to define a parameter as some_value_in_percent.

Bug: webrtc:9510
Change-Id: I0959d2b6c463f1bc1cea8e66f0bd5b56380b8c03
Reviewed-on: https://webrtc-review.googlesource.com/97302
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24538}
2018-09-03 15:02:58 +00:00
Sebastian Jansson
fea4637cfe Adds check for unused field trial parameters.
This adds a dcheck to detect if a FieldTrialParameter has been created
but not used in parsing a field trial. This is an easy mistake to make
and cause extra work debugging why nothing happens.

Also improving the ergonomics of using the parameter and optional
classes. Making it easier to use them as drop in replacements for their
underlying classes. In particular, the optional parameter class
implements and interface more similar to the optional class.

Bug: webrtc:9510
Change-Id: I5a12dd66396fa4cac9c9cf517172ae2f06984060
Reviewed-on: https://webrtc-review.googlesource.com/96761
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24527}
2018-09-03 08:52:51 +00:00
Sebastian Jansson
2c74d85c16 Adds enum field trial parser.
Removed the need to create a custom parser function and reuses some of
the code to reduce binary overhead of enums.

Bug: webrtc:9346
Change-Id: I51c9da713ed5456a86a2afbcf0991477bb83b894
Reviewed-on: https://webrtc-review.googlesource.com/83623
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23752}
2018-06-27 08:54:00 +00:00
Danil Chapovalov
0a1d189e50 Replace rtc::Optional with absl::optional in rtc_base
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script with parameter 'rtc_base'
Then manually fix where Optional was used without rtc prefix (patchset#3)

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I825f80cc8089747876ba6316d9e7c30e05716974
Reviewed-on: https://webrtc-review.googlesource.com/84585
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23700}
2018-06-21 11:23:40 +00:00
Sebastian Jansson
9eb38866cd Adds field trial parser.
Bug: webrtc:9346
Change-Id: Ibd07a1753feaa40d4be4d465d61f55bc8a8a9325
Reviewed-on: https://webrtc-review.googlesource.com/80263
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23615}
2018-06-14 16:02:38 +00:00