Files
abseil-cpp/absl/base/internal/strerror_benchmark.cc
Abseil Team 7ba8cdb56d Export of internal Abseil changes
--
8ae3cb636b81b6498ef30fbe59cc102a4098cad2 by Tom Manshreck <shreck@google.com>:

Upgrade absl::StatusOr<T> docs to Abseil standards

PiperOrigin-RevId: 329975341

--
7c7baf586c7380497a751f1a186a4ef0e650161a by Tom Manshreck <shreck@google.com>:

Update absl::Status to Abseil documentation standards

PiperOrigin-RevId: 329942967

--
6710d022ba987dbae7a5d83045a6697afeb972c4 by Derek Mauro <dmauro@google.com>:

Internal change

PiperOrigin-RevId: 329775111

--
fd182dc699e18522ef16d269731c57669c5487d2 by Abseil Team <absl-team@google.com>:

Google-internal change.

PiperOrigin-RevId: 329737362

--
c0df5e27ffb48d9c784e7019267580fcb4a3f92e by Xiaoyi Zhang <zhangxy@google.com>:

Remove obsolete `static_assert`.

PiperOrigin-RevId: 329727604
GitOrigin-RevId: 8ae3cb636b81b6498ef30fbe59cc102a4098cad2
Change-Id: Ic9dede0ab97f799e7f4093fae75ae0ec6cc21437
2020-09-04 12:59:29 -04:00

30 lines
933 B
C++

// Copyright 2020 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <cerrno>
#include <cstdio>
#include <string>
#include "absl/base/internal/strerror.h"
#include "benchmark/benchmark.h"
namespace {
void BM_AbslStrError(benchmark::State& state) {
for (auto _ : state) {
benchmark::DoNotOptimize(absl::base_internal::StrError(ERANGE));
}
}
BENCHMARK(BM_AbslStrError);
} // namespace