+BENCHMARK_DRAW_LINE()
+
+BENCHMARK(ipv6_to_fully_qualified_port, iters) {
+ IPAddressV6 ip("F1E0:0ACE:FB94:7ADF:22E8:6DE6:9672:3725");
+ while (iters--) {
+ string outputString = to<std::string>(ip.toFullyQualified(), ':', 65535);
+ folly::doNotOptimizeAway(outputString);
+ folly::doNotOptimizeAway(outputString.data());
+ }
+}
+
+BENCHMARK_RELATIVE(ipv6_append_to_fully_qualified_port, iters) {
+ IPAddressV6 ip("F1E0:0ACE:FB94:7ADF:22E8:6DE6:9672:3725");
+ while (iters--) {
+ string outputString;
+ outputString.reserve(folly::IPAddressV6::kToFullyQualifiedSize + 1 + 5);
+ ip.toFullyQualifiedAppend(outputString);
+ outputString += ':';
+ folly::toAppend(65535, &outputString);
+ folly::doNotOptimizeAway(outputString);
+ folly::doNotOptimizeAway(outputString.data());
+ }
+}
+