Skip to content

Commit

Permalink
Use absl::string_view for storing experiment names.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 317777149
Change-Id: Ied9d744ede1a1d1996bed689318678127ea446a0
  • Loading branch information
ckennelly committed Jun 23, 2020
1 parent 5a9546e commit 2c768fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tcmalloc/experiment_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#ifndef TCMALLOC_EXPERIMENT_CONFIG_H_
#define TCMALLOC_EXPERIMENT_CONFIG_H_

#include "absl/strings/string_view.h"

// Autogenerated by experiments_proto_test --experiments_generate_config=true
namespace tcmalloc {

Expand All @@ -28,11 +30,11 @@ enum class Experiment : int {

struct ExperimentConfig {
Experiment id;
const char* name;
absl::string_view name;
};

// clang-format off
constexpr ExperimentConfig experiments[] = {
inline constexpr ExperimentConfig experiments[] = {
{Experiment::TCMALLOC_TEMERAIRE, "TCMALLOC_TEMERAIRE"},
{Experiment::TCMALLOC_SANS_56_SIZECLASS, "TCMALLOC_SANS_56_SIZECLASS"},
{Experiment::TCMALLOC_LARGE_NUM_TO_MOVE, "TCMALLOC_LARGE_NUM_TO_MOVE"},
Expand Down

0 comments on commit 2c768fc

Please sign in to comment.