This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 62eac63  Removes all the metrics.config related stuff
62eac63 is described below

commit 62eac63db05c37fe51e223006ad21d4ecc3158fb
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Thu May 17 13:55:08 2018 -0600

    Removes all the metrics.config related stuff
---
 .gitignore                                         |   1 -
 CMakeLists.txt                                     |   6 -
 cmd/traffic_manager/AddConfigFilesHere.cc          |   1 -
 cmd/traffic_manager/Makefile.am                    |  22 --
 cmd/traffic_manager/metrics.cc                     | 370 ---------------------
 cmd/traffic_manager/metrics.h                      |  36 --
 cmd/traffic_manager/test_metrics.cc                | 115 -------
 cmd/traffic_manager/traffic_manager.cc             |  34 +-
 doc/admin-guide/files/index.en.rst                 |   4 -
 doc/admin-guide/files/metrics.config.en.rst        | 137 --------
 doc/manpages.py                                    |   1 -
 lib/bindings/Makefile.am                           |   2 -
 lib/bindings/metrics.cc                            | 259 ---------------
 lib/bindings/metrics.h                             |  37 ---
 proxy/config/Makefile.am                           |   1 -
 proxy/config/metrics.config.default                |  71 ----
 tests/README.md                                    |  47 ++-
 .../gold_tests/autest-site/trafficserver.test.ext  |   4 -
 18 files changed, 28 insertions(+), 1120 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9bc5b72..9a9f5ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,6 @@ cmd/traffic_ctl/traffic_ctl
 cmd/traffic_crashlog/traffic_crashlog
 cmd/traffic_top/traffic_top
 cmd/traffic_manager/traffic_manager
-cmd/traffic_manager/test_metrics
 cmd/traffic_layout/traffic_layout
 cmd/traffic_via/traffic_via
 cmd/traffic_wccp/traffic_wccp
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d5929b..a7eb06f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,6 @@ add_executable(traffic_crashlog
 add_executable(traffic_ctl
         cmd/traffic_ctl/alarm.cc
         cmd/traffic_ctl/config.cc
-        cmd/traffic_ctl/metric.cc
         cmd/traffic_ctl/plugin.cc
         cmd/traffic_ctl/server.cc
         cmd/traffic_ctl/storage.cc
@@ -84,9 +83,6 @@ add_executable(traffic_layout
 
 add_executable(traffic_manager
         cmd/traffic_manager/AddConfigFilesHere.cc
-        cmd/traffic_manager/metrics.cc
-        cmd/traffic_manager/metrics.h
-        cmd/traffic_manager/test_metrics.cc
         cmd/traffic_manager/traffic_manager.cc
 )
 
@@ -336,8 +332,6 @@ add_executable(ats
         lib/bindings/bindings.h
         lib/bindings/lua.cc
         lib/bindings/lua.h
-        lib/bindings/metrics.cc
-        lib/bindings/metrics.h
         lib/bindings/repl.cc
         lib/bindings/repl.h
         lib/cppapi/include/atscppapi/Async.h
diff --git a/cmd/traffic_manager/AddConfigFilesHere.cc 
b/cmd/traffic_manager/AddConfigFilesHere.cc
index d514952..fb872fa 100644
--- a/cmd/traffic_manager/AddConfigFilesHere.cc
+++ b/cmd/traffic_manager/AddConfigFilesHere.cc
@@ -75,7 +75,6 @@ initializeRegistry()
   configFiles->addFile("plugin.config", false);
   configFiles->addFile("splitdns.config", false);
   configFiles->addFile("ssl_multicert.config", false);
-  configFiles->addFile("metrics.config", false);
   configFiles->addFile(SSL_SERVER_NAME_CONFIG, false);
   configFiles->registerCallback(testcall);
 }
diff --git a/cmd/traffic_manager/Makefile.am b/cmd/traffic_manager/Makefile.am
index a3a20cc..baa27c3 100644
--- a/cmd/traffic_manager/Makefile.am
+++ b/cmd/traffic_manager/Makefile.am
@@ -16,9 +16,6 @@
 #  limitations under the License.
 
 bin_PROGRAMS = traffic_manager
-check_PROGRAMS = test_metrics
-
-TESTS = $(check_PROGRAMS)
 
 AM_CPPFLAGS += \
        $(LUAJIT_CPPFLAGS) \
@@ -43,7 +40,6 @@ AM_LDFLAGS += \
 
 traffic_manager_SOURCES = \
        AddConfigFilesHere.cc \
-       metrics.h \
        traffic_manager.cc
 
 traffic_manager_LDADD = \
@@ -58,9 +54,6 @@ traffic_manager_LDADD = \
 AM_LDFLAGS += \
        $(LUAJIT_LDFLAGS)
 
-traffic_manager_SOURCES += \
-       metrics.cc
-
 traffic_manager_LDADD += \
        $(top_builddir)/lib/bindings/libbindings.la
 
@@ -79,16 +72,6 @@ traffic_manager_LDADD +=\
        @LIBPCRE@ @LIBTCL@ @LIBCAP@ @HWLOC_LIBS@ \
        -lm
 
-test_metrics_SOURCES = test_metrics.cc metrics.cc
-test_metrics_LDADD = \
-       $(top_builddir)/mgmt/libmgmt_lm.la \
-       $(top_builddir)/lib/records/librecords_lm.a \
-       $(top_builddir)/lib/bindings/libbindings.la \
-       $(top_builddir)/lib/luajit/src/libluajit.a \
-       $(top_builddir)/lib/ts/libtsutil.la \
-       $(top_builddir)/iocore/eventsystem/libinkevent.a \
-       @LIBTCL@ @LIBPCRE@
-
 # Must do it this way or the dependencies aren't detected.
 if BUILD_WCCP
 
@@ -97,11 +80,6 @@ traffic_manager_LDADD += \
        $(top_builddir)/lib/tsconfig/libtsconfig.la \
        @OPENSSL_LIBS@
 
-test_metrics_LDADD += \
-       $(top_builddir)/lib/wccp/libwccp.a \
-       $(top_builddir)/lib/tsconfig/libtsconfig.la \
-       @OPENSSL_LIBS@
-
 endif
 
 include $(top_srcdir)/build/tidy.mk
diff --git a/cmd/traffic_manager/metrics.cc b/cmd/traffic_manager/metrics.cc
deleted file mode 100644
index 04c30e8..0000000
--- a/cmd/traffic_manager/metrics.cc
+++ /dev/null
@@ -1,370 +0,0 @@
-/** @file
- *
- *  Traffic Manager custom metrics.
- *
- *  @section license License
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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
- *
- *      http://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 <cmath>
-#include <vector>
-
-#include "ts/ink_config.h"
-#include "ts/ink_memory.h"
-#include "ts/Ptr.h"
-#include "ts/I_Layout.h"
-#include "bindings/bindings.h"
-#include "bindings/metrics.h"
-#include "I_RecCore.h"
-#include "MgmtDefs.h"
-#include "MgmtUtils.h"
-#include "metrics.h"
-
-struct Evaluator {
-  Evaluator() : rec_name(nullptr), data_type(RECD_NULL), ref(LUA_NOREF) {}
-
-  ~Evaluator() { ink_release_assert(this->ref == LUA_NOREF); }
-
-  Evaluator(const Evaluator &) = delete;
-  Evaluator &operator=(const Evaluator &) = delete;
-
-  bool
-  bind(lua_State *L, const char *metric, const char *expression)
-  {
-    const char *err = nullptr;
-    if (RecGetRecordDataType(metric, &this->data_type) != REC_ERR_OKAY) {
-      return false;
-    }
-
-    this->rec_name = ats_strdup(metric);
-
-    switch (luaL_loadstring(L, expression)) {
-    case LUA_ERRSYNTAX:
-    case LUA_ERRMEM:
-      err = luaL_checkstring(L, -1);
-      Debug("lua", "loadstring failed for %s: %s", metric, err);
-      luaL_error(L, "invalid expression for %s: %s", metric, err);
-      return false;
-    case 0:
-      break; // success
-    }
-
-    // The loaded chunk is now on the top of the stack. Stuff it into the 
registry
-    // so we can evaluate it later.
-    this->ref = luaL_ref(L, LUA_REGISTRYINDEX);
-
-    return true;
-  }
-
-  void
-  unbind(lua_State *L)
-  {
-    if (this->ref != LUA_NOREF) {
-      luaL_unref(L, LUA_REGISTRYINDEX, this->ref);
-    }
-
-    ats_free(this->rec_name);
-
-    this->ref       = LUA_NOREF;
-    this->rec_name  = nullptr;
-    this->data_type = RECD_NULL;
-  }
-
-  void
-  eval(lua_State *L) const
-  {
-    // Push the stashed expression chunk onto the stack.
-    lua_rawgeti(L, LUA_REGISTRYINDEX, this->ref);
-
-    // Evaluate it. Note that we don't emit a warning for
-    // evaluation errors. This is because not all metrics (eg.
-    // cache metrics) are available early in startup so we don't
-    // want to log spurious warning. Unfortunately it means that
-    // to check your config for errors you need to enable
-    // diagnostic tags.
-    lua_pushstring(L, this->rec_name);
-    if (lua_pcall(L, 1 /* nargs */, 1 /* nresults */, 0) != 0) {
-      Debug("lua", "failed to evaluate %s: %s", this->rec_name, 
lua_tostring(L, -1));
-      lua_pop(L, 1);
-      return;
-    }
-
-    // If we got a return value, set it on the record. Records can return nil 
to
-    // indicate they don't want to be set on this round.
-    if (!lua_isnil(L, -1)) {
-      RecData rec_value;
-
-      switch (this->data_type) {
-      case RECD_INT:
-        rec_value.rec_int = lua_tointeger(L, -1);
-        break;
-      case RECD_COUNTER:
-        rec_value.rec_counter = lua_tointeger(L, -1);
-        break;
-      case RECD_FLOAT:
-        // Lua will eval 0/0 to NaN rather than 0.
-        rec_value.rec_float = lua_tonumber(L, -1);
-        if (std::isnan(rec_value.rec_float)) {
-          rec_value.rec_float = 0.0;
-        }
-        break;
-      default:
-        goto done;
-      }
-
-      RecSetRecord(RECT_NULL, this->rec_name, this->data_type, &rec_value, 
nullptr, REC_SOURCE_EXPLICIT);
-    }
-
-  done:
-    // Pop the return value.
-    lua_pop(L, 1);
-  }
-
-private:
-  char *rec_name;
-  RecDataT data_type;
-
-  int ref;
-};
-
-struct EvaluatorList {
-  EvaluatorList() : update(true), passes(0) {}
-  ~EvaluatorList()
-  {
-    for (auto &e : this->evaluators) {
-      delete e;
-    }
-  }
-
-  EvaluatorList(const EvaluatorList &) = delete;
-  EvaluatorList &operator=(const EvaluatorList &) = delete;
-
-  void
-  push_back(Evaluator *e)
-  {
-    evaluators.push_back(e);
-  }
-
-  void
-  unbind(lua_State *L) const
-  {
-    for (auto &e : this->evaluators) {
-      e->unbind(L);
-    }
-  }
-
-  void
-  evaluate(lua_State *L) const
-  {
-    ink_hrtime start = ink_get_hrtime_internal();
-    ink_hrtime elapsed;
-
-    for (auto &e : this->evaluators) {
-      e->eval(L);
-    }
-
-    elapsed = ink_hrtime_diff(ink_get_hrtime_internal(), start);
-    Debug("lua", "evaluated %lu metrics in %fmsec", evaluators.size(), 
ink_hrtime_to_usec(elapsed) / 1000.0);
-  }
-
-  bool update;
-  int64_t passes;
-  std::vector<Evaluator *> evaluators;
-};
-
-static int
-update_metrics_namespace(lua_State *L)
-{
-  lua_Integer count;
-
-  lua_metrics_install(L);
-  count = lua_tointeger(L, 1);
-  lua_pop(L, 1);
-
-  return count;
-}
-
-static int64_t
-timestamp_now_msec()
-{
-  ink_hrtime now = ink_get_hrtime_internal();
-  return ink_hrtime_to_msec(now);
-}
-
-static int
-metrics_register_evaluator(lua_State *L)
-{
-  const char *metric;
-  const char *chunk;
-  Evaluator *eval;
-  EvaluatorList *evaluators;
-  BindingInstance *binding;
-
-  // The metric name is the first upvalue (from the record creation closure).
-  metric = lua_tostring(L, lua_upvalueindex(1));
-  // The evaluation chunk is the (only) argument.
-  chunk = lua_tostring(L, -1);
-
-  binding    = BindingInstance::self(L);
-  evaluators = (EvaluatorList *)binding->retrieve_ptr("evaluators");
-
-  ink_release_assert(evaluators != nullptr);
-
-  eval = new Evaluator();
-  eval->bind(L, metric, chunk);
-
-  evaluators->push_back(eval);
-  return 0;
-}
-
-static int
-metrics_create_record(lua_State *L, RecDataT data_type)
-{
-  const char *name;
-  RecT rec_type = RECT_NULL;
-  int error     = REC_ERR_FAIL;
-
-  BindingInstance::typecheck(L, "record.create", LUA_TSTRING, LUA_TNONE);
-
-  // Get the name of the record to create.
-  name = lua_tostring(L, -1);
-
-  if (strncmp(name, "proxy.process.", sizeof("proxy.process.") - 1) == 0) {
-    rec_type = RECT_PROCESS;
-  } else if (strncmp(name, "proxy.node.", sizeof("proxy.node.") - 1) == 0) {
-    rec_type = RECT_NODE;
-  }
-
-  // You have to follow the naming convention.
-  if (rec_type == RECT_NULL) {
-    luaL_error(L, "invalid metric name '%s'", name);
-  }
-
-  switch (data_type) {
-  case RECD_INT:
-    error = RecRegisterStatInt(rec_type, name, 0, RECP_NON_PERSISTENT);
-    break;
-  case RECD_FLOAT:
-    error = RecRegisterStatFloat(rec_type, name, 0, RECP_NON_PERSISTENT);
-    break;
-  case RECD_COUNTER:
-    error = RecRegisterStatCounter(rec_type, name, 0, RECP_NON_PERSISTENT);
-    break;
-  default:
-    break;
-  }
-
-  if (error != REC_ERR_OKAY) {
-    luaL_error(L, "failed to register metric '%s'", name);
-  }
-
-  // Push a copy of the metric name onto the stack.
-  lua_pushvalue(L, -1);
-  // Push the Evaluator as a closure with the metric name as an upvalue.
-  lua_pushcclosure(L, metrics_register_evaluator, 1);
-
-  Debug("lua", "registered %s as record type %d", name, rec_type);
-  return 1;
-}
-
-static int
-metrics_create_integer(lua_State *L)
-{
-  return metrics_create_record(L, RECD_INT);
-}
-
-static int
-metrics_create_counter(lua_State *L)
-{
-  return metrics_create_record(L, RECD_COUNTER);
-}
-
-static int
-metrics_create_float(lua_State *L)
-{
-  return metrics_create_record(L, RECD_FLOAT);
-}
-
-bool
-metrics_binding_initialize(BindingInstance &binding)
-{
-  if (!binding.construct()) {
-    mgmt_fatal(0, "failed to initialize Lua runtime\n");
-  }
-
-  // Register the metrics userdata type.
-  lua_metrics_register(binding.lua);
-  update_metrics_namespace(binding.lua);
-
-  // Register our own API.
-  binding.bind_function("integer", metrics_create_integer);
-  binding.bind_function("counter", metrics_create_counter);
-  binding.bind_function("float", metrics_create_float);
-
-  binding.bind_constant("metrics.now.msec", timestamp_now_msec());
-  binding.bind_constant("metrics.update.pass", lua_Integer(0));
-
-  // Stash a backpointer to the evaluators.
-  binding.attach_ptr("evaluators", new EvaluatorList());
-
-  return true;
-}
-
-void
-metrics_binding_destroy(BindingInstance &binding)
-{
-  EvaluatorList *evaluators;
-
-  evaluators = (EvaluatorList *)binding.retrieve_ptr("evaluators");
-  binding.attach_ptr("evaluators", nullptr);
-
-  evaluators->unbind(binding.lua);
-  delete evaluators;
-}
-
-bool
-metrics_binding_configure(BindingInstance &binding)
-{
-  ats_scoped_str sysconfdir(RecConfigReadConfigDir());
-  ats_scoped_str config(Layout::get()->relative_to(sysconfdir.get(), 
"metrics.config"));
-
-  return binding.require(config.get());
-}
-
-void
-metrics_binding_evaluate(BindingInstance &binding)
-{
-  EvaluatorList *evaluators;
-
-  evaluators = (EvaluatorList *)binding.retrieve_ptr("evaluators");
-  ink_release_assert(evaluators != nullptr);
-
-  // Keep updating the namespace until it settles (ie. we make 0 updates).
-  if (evaluators->update) {
-    evaluators->update = update_metrics_namespace(binding.lua) ? true : false;
-  }
-
-  binding.bind_constant("metrics.now.msec", timestamp_now_msec());
-  binding.bind_constant("metrics.update.pass", ++evaluators->passes);
-  evaluators->evaluate(binding.lua);
-
-  // Periodically refresh the namespace to catch newly added metrics.
-  if (evaluators->passes % 10 == 0) {
-    evaluators->update = true;
-  }
-}
diff --git a/cmd/traffic_manager/metrics.h b/cmd/traffic_manager/metrics.h
deleted file mode 100644
index 4b67d45..0000000
--- a/cmd/traffic_manager/metrics.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/** @file
- *
- *  Traffic Manager custom metrics.
- *
- *  @section license License
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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
- *
- *      http://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.
- */
-
-#pragma once
-
-#include "bindings/bindings.h"
-#include "bindings/metrics.h"
-
-bool metrics_binding_initialize(BindingInstance &binding);
-void metrics_binding_destroy(BindingInstance &binding);
-
-// Configure metrics from the metrics.config configuration file.
-bool metrics_binding_configure(BindingInstance &binding);
-
-// Evaluate the metrics in this binding instance.
-void metrics_binding_evaluate(BindingInstance &binding);
diff --git a/cmd/traffic_manager/test_metrics.cc 
b/cmd/traffic_manager/test_metrics.cc
deleted file mode 100644
index 84b2a42..0000000
--- a/cmd/traffic_manager/test_metrics.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you 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
-
-      http://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 "ts/Regression.h"
-#include "ts/TestBox.h"
-#include "ts/I_Layout.h"
-#include "LocalManager.h"
-#include "RecordsConfig.h"
-#include "P_RecLocal.h"
-#include "metrics.h"
-
-LocalManager *lmgmt = nullptr;
-
-// Check that we can load and delete metrics.
-REGRESSION_TEST(LoadMetrics)(RegressionTest *t, int /* atype ATS_UNUSED */, 
int *pstatus)
-{
-  TestBox box(t, pstatus);
-
-  box = REGRESSION_TEST_PASSED;
-
-  BindingInstance binding;
-  box.check(metrics_binding_initialize(binding), "initialize metrics");
-  metrics_binding_destroy(binding);
-}
-
-// Check that we can set a value.
-REGRESSION_TEST(EvalMetrics)(RegressionTest *t, int /* atype ATS_UNUSED */, 
int *pstatus)
-{
-  TestBox box(t, pstatus);
-
-  box = REGRESSION_TEST_PASSED;
-
-  const char *config = R"(
-integer 'proxy.node.test.value' [[
-  return 5
-]]
-  )";
-
-  BindingInstance binding;
-
-  box.check(metrics_binding_initialize(binding), "initialize metrics");
-  box.check(binding.eval(config), "load metrics config");
-
-  metrics_binding_evaluate(binding);
-
-  RecInt value = 0;
-  box.check(RecGetRecordInt("proxy.node.test.value", &value) == REC_ERR_OKAY, 
"read value (5) from proxy.node.test.value");
-  box.check(value == 5, "proxy.node.test.value was %" PRId64 ", wanted 5", 
value);
-
-  metrics_binding_destroy(binding);
-}
-
-// Check that we can bind a constant and set the value based on that.
-// Also check that we can bind the constant again and get the updated value.
-REGRESSION_TEST(EvalBoundedMetrics)(RegressionTest *t, int /* atype ATS_UNUSED 
*/, int *pstatus)
-{
-  TestBox box(t, pstatus);
-
-  box = REGRESSION_TEST_PASSED;
-
-  const char *config = R"(
-integer 'proxy.node.test.value' [[
-  return test
-]]
-  )";
-
-  BindingInstance binding;
-
-  box.check(metrics_binding_initialize(binding), "initialize metrics");
-  box.check(binding.bind_constant("test", 100), "binding for a constant");
-  box.check(binding.eval(config), "load metrics config");
-
-  metrics_binding_evaluate(binding);
-
-  RecInt value = 0;
-  box.check(RecGetRecordInt("proxy.node.test.value", &value) == REC_ERR_OKAY, 
"read value (100) from proxy.node.test.value");
-  box.check(value == 100, "proxy.node.test.value was %" PRId64 ", wanted 100", 
value);
-
-  box.check(binding.bind_constant("test", 101), "update binding for the 
constant");
-
-  metrics_binding_evaluate(binding);
-
-  value = 0;
-  box.check(RecGetRecordInt("proxy.node.test.value", &value) == REC_ERR_OKAY, 
"read value (101) from proxy.node.test.value");
-  box.check(value == 101, "proxy.node.test.value was %" PRId64 ", wanted 101", 
value);
-
-  metrics_binding_destroy(binding);
-}
-
-int
-main(int argc, const char **argv)
-{
-  Layout::create();
-  RecLocalInit();
-  LibRecordsConfigInit();
-  return RegressionTest::main(argc, argv, REGRESSION_TEST_QUICK);
-}
diff --git a/cmd/traffic_manager/traffic_manager.cc 
b/cmd/traffic_manager/traffic_manager.cc
index 2866270..f820676 100644
--- a/cmd/traffic_manager/traffic_manager.cc
+++ b/cmd/traffic_manager/traffic_manager.cc
@@ -50,8 +50,6 @@
 
 #include "P_RecLocal.h"
 
-#include "metrics.h"
-
 #if TS_USE_POSIX_CAP
 #include <sys/capability.h>
 #endif
@@ -92,7 +90,7 @@ static const char *recs_conf = "records.config";
 
 static int fds_limit;
 
-static int metrics_version;
+// ToDo: Any globals for calculated metrics
 
 // TODO: Use positive instead negative selection
 //       This should just be #if defined(solaris)
@@ -489,9 +487,6 @@ main(int argc, const char **argv)
   char userToRunAs[MAX_LOGIN + 1];
   RecInt fds_throttle = -1;
 
-  int binding_version      = 0;
-  BindingInstance *binding = nullptr;
-
   ArgumentDescription argument_descriptions[] = {
     {"proxyOff", '-', "Disable proxy", "F", &proxy_off, nullptr, nullptr},
     {"path", '-', "Path to the management socket", "S*", &mgmt_path, nullptr, 
nullptr},
@@ -715,29 +710,16 @@ main(int argc, const char **argv)
 
   RecRegisterStatInt(RECT_NODE, "proxy.node.config.draining", 0, 
RECP_NON_PERSISTENT);
 
-  binding = new BindingInstance;
-  metrics_binding_initialize(*binding);
-  metrics_binding_configure(*binding);
-
   const int MAX_SLEEP_S      = 60; // Max sleep duration
   int sleep_time             = 0;  // sleep_time given in sec
   uint64_t last_start_epoc_s = 0;  // latest start attempt in seconds since 
epoc
 
+  // ToDo: Initialize whatever is needed for calculated metrics
+
   for (;;) {
     lmgmt->processEventQueue();
     lmgmt->pollMgmtProcessServer();
 
-    if (binding_version != metrics_version) {
-      metrics_binding_destroy(*binding);
-      delete binding;
-
-      binding = new BindingInstance;
-      metrics_binding_initialize(*binding);
-      metrics_binding_configure(*binding);
-
-      binding_version = metrics_version;
-    }
-
     // Handle rotation of output log (aka traffic.out) as well as 
DIAGS_LOG_FILENAME (aka manager.log)
     rotateLogs();
 
@@ -749,7 +731,7 @@ main(int argc, const char **argv)
       mgmt_log("[main] Reading Configuration Files Reread\n");
     }
 
-    metrics_binding_evaluate(*binding);
+    // ToDo: Here we should update the calculated metrics
 
     if (lmgmt->mgmt_shutdown_outstanding != MGMT_PENDING_NONE) {
       Debug("lm", "pending shutdown %d", lmgmt->mgmt_shutdown_outstanding);
@@ -860,10 +842,7 @@ main(int argc, const char **argv)
     }
   }
 
-  if (binding) {
-    metrics_binding_destroy(*binding);
-    delete binding;
-  }
+  // ToDo: Here we should delete anything related to calculated metrics.
 
 #ifndef MGMT_SERVICE
   return 0;
@@ -1025,9 +1004,6 @@ fileUpdated(char *fname, bool incVersion)
   } else if (strcmp(fname, "proxy.config.body_factory.template_sets_dir") == 
0) {
     lmgmt->signalFileChange("proxy.config.body_factory.template_sets_dir");
 
-  } else if (strcmp(fname, "metrics.config") == 0) {
-    ink_atomic_increment(&metrics_version, 1);
-    mgmt_log("[fileUpdated] metrics.config file has been modified\n");
   } else if (strcmp(fname, "proxy.config.ssl.server.ticket_key.filename") == 
0) {
     lmgmt->signalFileChange("proxy.config.ssl.server.ticket_key.filename");
   } else if (strcmp(fname, SSL_SERVER_NAME_CONFIG) == 0) {
diff --git a/doc/admin-guide/files/index.en.rst 
b/doc/admin-guide/files/index.en.rst
index d6eb264..09e7c0f 100644
--- a/doc/admin-guide/files/index.en.rst
+++ b/doc/admin-guide/files/index.en.rst
@@ -30,7 +30,6 @@ Configuration Files
    ip_allow.config.en
    log_hosts.config.en
    logging.config.en
-   metrics.config.en
    parent.config.en
    plugin.config.en
    records.config.en
@@ -60,9 +59,6 @@ Configuration Files
 :doc:`logging.config.en`
    Defines custom log file formats, filters, and processing options.
 
-:doc:`metrics.config.en`
-   Defines custom dynamic metrics using Lua scripting.
-
 :doc:`parent.config.en`
    Configures parent proxies in hierarchical caching layouts.
 
diff --git a/doc/admin-guide/files/metrics.config.en.rst 
b/doc/admin-guide/files/metrics.config.en.rst
deleted file mode 100644
index e297f16..0000000
--- a/doc/admin-guide/files/metrics.config.en.rst
+++ /dev/null
@@ -1,137 +0,0 @@
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you 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
-
-   http://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:: ../../common.defs
-
-.. configfile:: metrics.config
-
-metrics.config
-**************
-
-This configuration file is used to define dynamic metrics on |TS| activity.
-Metrics defined here are available through all normal means of metrics
-reporting, including :program:`traffic_line` and 
:ref:`admin-plugins-stats-over-http`.
-
-Format
-======
-
-The configuration file itself is a Lua script. As with normal Lua code, 
comments
-begin with ``--``, you may declare your own functions, and you may define 
global
-variables.
-
-Metric Definitions
-==================
-
-Metrics are defined by calling the supplied metric generator functions. There
-is one for each supported type, and their parameters are identical::
-
-    <typefn> '<name>' [[
-      <metric generating function body>
-    ]]
-
-In practice, this will look like:
-
-.. code:: lua
-
-    float 'proxy.node.useful_metric' [[
-        return math.random()
-    ]]
-
-With perhaps something more useful in the body of the metric generator. The
-string containing the metric generating function's body (everything between
-``[[`` and ``]]``, which is a multiline literal string in Lua) is stored and
-then evaluated as an anonymous function, which will receive a single argument:
-the name of the metric (in the example above: ``proxy.node.useful_metric``). If
-necessary, you can capture this parameter using the ``...`` operator, which
-returns the remaining parameters of the enclosing function.
-
-Metric Types
-------------
-
-float
-~~~~~
-
-A gauge style metric which will return floating point numbers. Floating point
-gauge metrics are appropriate for values which may increase or decrease
-arbitrarily (e.g. disk usage, cache hit ratios, average document sizes, and so
-on).
-
-integer
-~~~~~~~
-
-A gauge style metric which will return integers. Integer gauge metrics are
-appropriate for values which may increase or descrease arbitrarily, and do not
-need any decimal components.
-
-counter
-~~~~~~~
-
-A metric which will supply integer only values used almost exclusively to
-report on the number of events, whatever they may be, that have occurred.
-Frequent uses are the number of requests served, responses by specific HTTP
-status codes, the number of failed DNS lookups, and so on.
-
-Metric Scopes
--------------
-
-All dynamic metrics, like their built-in counterparts, exist within a scope
-which determines whether they reflect the state of the current |TS| node, or
-the state of the entire |TS| cluster for which the current node is a member.
-
-The scope of a metric is derived from its name. All metric names begin with
-``proxy.`` followed by either ``node.`` or ``cluster.``.
-
-Thus, ``proxy.node.active_origin_connections`` might be used for the number of
-open connections to origin servers on just the current node, whereas
-``proxy.cluster.active_origin_connections`` would be the counterpart for the
-total open connections to origin servers from all |TS| nodes in the cluster,
-including the current node. (Note that these names are contrived, and you are
-advised to both pick as clear and detailed a metric name as possible and also
-to ensure there is no conflict with existing metric names).
-
-Definition Examples
--------------------
-
-For illustrative purposes, a few of the dynamic metric definitions you may find
-in your |TS| installation's default :file:`metrics.config` are explained here.
-The actual file will contain many more definitions, and of course you may add
-your own, as well.
-
-Returning a single value
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-The simplest example is a dynamic node metric which does nothing but return the
-current value for an underlying process metric:
-
-.. code:: lua
-
-    counter 'proxy.node.http.user_agents_total_documents_served' [[
-      return proxy.process.http.incoming_requests
-    ]]
-
-This uses the built-in function ``counter``, which takes two parameters: the
-name of the dynamic metric to create followed by the function used to calculate
-the value. In this case, the function body is just a ``return`` of the named,
-underlying process statistic. No calculations, aggregates, or other processing
-are performed.
-
-Further Reading
-===============
-
-The following resources may be useful when writing dynamic metrics:
-
-* `Lua Documentation <https://www.lua.org/docs.html>`_
diff --git a/doc/manpages.py b/doc/manpages.py
index 961fc8d..e21cb00 100644
--- a/doc/manpages.py
+++ b/doc/manpages.py
@@ -39,7 +39,6 @@ man_pages = [
     ('admin-guide/files/ip_allow.config.en', 'ip_allow.config', u'Traffic 
Server IP access control configuration file', None, '5'),
     ('admin-guide/files/log_hosts.config.en', 'log_hosts.config', u'Traffic 
Server log host configuration file', None, '5'),
     ('admin-guide/files/logging.config.en', 'logging.config', u'Traffic Server 
logging configuration file', None, '5'),
-    ('admin-guide/files/metrics.config.en', 'metrics.config', u'Traffic Server 
dynamic metrics configuration file', None, '5'),
     ('admin-guide/files/parent.config.en', 'parent.config', u'Traffic Server 
parent cache configuration file', None, '5'),
     ('admin-guide/files/plugin.config.en', 'plugin.config', u'Traffic Server 
global plugin configuration file', None, '5'),
     ('admin-guide/files/records.config.en', 'records.config', u'Traffic Server 
configuration file', None, '5'),
diff --git a/lib/bindings/Makefile.am b/lib/bindings/Makefile.am
index 5971329..eef61e3 100644
--- a/lib/bindings/Makefile.am
+++ b/lib/bindings/Makefile.am
@@ -31,8 +31,6 @@ libbindings_la_SOURCES = \
        bindings.h \
        lua.cc \
        lua.h \
-       metrics.cc \
-       metrics.h \
        repl.cc \
        repl.h
 
diff --git a/lib/bindings/metrics.cc b/lib/bindings/metrics.cc
deleted file mode 100644
index 227e7a1..0000000
--- a/lib/bindings/metrics.cc
+++ /dev/null
@@ -1,259 +0,0 @@
-/** @file
-
-  Lua bindings for librecords.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you 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
-
-      http://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 "bindings.h"
-#include "metrics.h"
-#include "P_RecCore.h"
-#include "ts/ink_memory.h"
-#include <map>
-#include <set>
-
-#define BINDING "lua.metrics"
-
-struct metrics_binding {
-  static metrics_binding *check(lua_State *L, int index);
-
-  typedef std::map<std::string, int> ref_map;
-
-  ats_scoped_str prefix;
-  size_t prefixlen;
-  ref_map refs;
-};
-
-metrics_binding *
-metrics_binding::check(lua_State *L, int index)
-{
-  metrics_binding *m;
-
-  luaL_checktype(L, index, LUA_TUSERDATA);
-  m = (metrics_binding *)luaL_checkudata(L, index, BINDING);
-  if (m == nullptr) {
-    luaL_typerror(L, index, "userdata");
-  }
-
-  return m;
-}
-
-static bool
-metrics_record_exists(const char *name)
-{
-  RecT rec_type;
-  return RecGetRecordType(name, &rec_type) == REC_ERR_OKAY;
-}
-
-// Push the value of a record onto the Lua stack.
-static void
-metrics_push_record(const RecRecord *rec, void *ptr)
-{
-  lua_State *L = (lua_State *)ptr;
-
-  ink_assert(REC_TYPE_IS_STAT(rec->rec_type));
-
-  switch (rec->data_type) {
-  case RECD_INT: /* fallthru */
-  case RECD_COUNTER:
-    lua_pushinteger(L, rec->data.rec_int);
-    break;
-  case RECD_FLOAT:
-    lua_pushnumber(L, rec->data.rec_float);
-    break;
-  case RECD_STRING:
-    lua_pushlstring(L, rec->data.rec_string, strlen(rec->data.rec_string));
-    break;
-  default:
-    lua_pushnil(L);
-  }
-}
-
-// Return the value of a metric, relative to the bound prefix.
-static int
-metrics_index(lua_State *L)
-{
-  metrics_binding *m = metrics_binding::check(L, 1);
-  metrics_binding::ref_map::iterator ptr;
-
-  const char *key;
-  size_t len;
-
-  key = luaL_checklstring(L, 2, &len);
-  ink_release_assert(key != nullptr && len != 0);
-
-  // First, check whether we have a reference stored for this key.
-  ptr = m->refs.find(std::string(key, len));
-  if (ptr != m->refs.end()) {
-    // We have a ref, so push the saved table reference to the stack.
-    lua_rawgeti(L, LUA_REGISTRYINDEX, ptr->second);
-  } else {
-    char name[m->prefixlen + sizeof(".") + len];
-
-    snprintf(name, sizeof(name), "%s.%.*s", m->prefix.get(), (int)len, key);
-
-    // Push the indexed record value, or nil if there is nothing there.
-    if (RecLookupRecord(name, metrics_push_record, L) != REC_ERR_OKAY) {
-      lua_pushnil(L);
-    }
-  }
-
-  return 1;
-}
-
-static int
-metrics_newindex(lua_State *L)
-{
-  // The stack now looks like:
-  //  1   the table value (userdata)
-  //  2   key to index (string)
-  //  3   value to insert (should be a table)
-
-  metrics_binding *m = metrics_binding::check(L, 1);
-  const char *key;
-  size_t len;
-  metrics_binding::ref_map::iterator ptr;
-
-  key = luaL_checklstring(L, 2, &len);
-  switch (lua_type(L, 3)) {
-  case LUA_TUSERDATA:
-    metrics_binding::check(L, 3);
-    break;
-  case LUA_TTABLE:
-    break;
-  default:
-    luaL_typerror(L, 3, "userdata or table");
-  }
-
-  char name[m->prefixlen + sizeof(".") + len];
-
-  snprintf(name, sizeof(name), "%s.%.*s", m->prefix.get(), (int)len, key);
-
-  // If this index is already a record, don't overwrite it.
-  if (metrics_record_exists(name)) {
-    return 0;
-  }
-
-  ptr = m->refs.find(std::string(key, len));
-  if (ptr != m->refs.end()) {
-    // Remove the previously saved reference.
-    luaL_unref(L, LUA_REGISTRYINDEX, ptr->second);
-  }
-
-  // Pop the top of the stack into a reference that we store in the refmap.
-  lua_pushvalue(L, 3);
-  m->refs[std::string(key, len)] = luaL_ref(L, LUA_REGISTRYINDEX);
-
-  return 0;
-}
-
-static int
-metrics_gc(lua_State *L)
-{
-  metrics_binding *m = metrics_binding::check(L, 1);
-
-  // Clean up any references we stashed.
-  for (auto &ref : m->refs) {
-    luaL_unref(L, LUA_REGISTRYINDEX, ref.second);
-  }
-
-  m->~metrics_binding();
-  return 0;
-}
-
-int
-lua_metrics_new(const char *prefix, lua_State *L)
-{
-  metrics_binding *m = lua_newuserobject<metrics_binding>(L);
-
-  Debug("lua", "new metrics binding for prefix %s", prefix);
-  m->prefix    = ats_strdup(prefix);
-  m->prefixlen = strlen(prefix);
-
-  luaL_getmetatable(L, BINDING);
-  lua_setmetatable(L, -2);
-
-  // Leave the userdata on the stack.
-  return 1;
-}
-
-void
-lua_metrics_register(lua_State *L)
-{
-  static const luaL_reg metatable[] = {
-    {"__gc", metrics_gc},
-    {"__index", metrics_index},
-    {"__newindex", metrics_newindex},
-    {nullptr, nullptr},
-  };
-
-  BindingInstance::register_metatable(L, BINDING, metatable);
-}
-
-static void
-install_metrics_object(RecT rec_type, void *edata, int registered, const char 
*name, int data_type, RecData *datum)
-{
-  std::set<std::string> *prefixes = (std::set<std::string> *)edata;
-
-  if (likely(registered)) {
-    const char *end = strrchr(name, '.');
-
-    if (end) {
-      ptrdiff_t len = end - name;
-      prefixes->insert(std::string(name, len));
-    } else {
-      // If there is no prefix in the metric name, we can't install a
-      // metrics object placeholder. We depend on the __index metamethod
-      // to give us a trigger for performing a records lookup. If we don't
-      // have a prefix, then we just have a global variable named after
-      // the metrics record and the best we could to with that would be to
-      // push a constant value, which would always be stale.
-      Debug("lua", "unable to install metrics object at %s: missing prefix", 
name);
-    }
-  }
-}
-
-int
-lua_metrics_install(lua_State *L)
-{
-  int count                = 0;
-  int metrics_type         = RECT_NODE | RECT_PROCESS | RECT_PLUGIN;
-  BindingInstance *binding = BindingInstance::self(L);
-  std::set<std::string> prefixes;
-
-  // Gather all the metrics namespace prefixes into a sorted set. We want to 
install
-  // metrics objects as the last branch of the namespace so that leaf metrics 
lookup
-  // end up indexing metrics objects.
-  RecDumpRecords((RecT)metrics_type, install_metrics_object, &prefixes);
-
-  for (std::set<std::string>::const_iterator p = prefixes.cbegin(); p != 
prefixes.cend(); ++p) {
-    if (lua_metrics_new(p->c_str(), binding->lua) == 1) {
-      if (binding->bind_value(p->c_str(), -1)) {
-        Debug("lua", "installed metrics object at prefix %s", p->c_str());
-        ++count;
-      }
-
-      lua_pop(binding->lua, 1);
-    }
-  }
-
-  // Return the number of metrics we installed;
-  lua_pushinteger(L, count);
-  return 1;
-}
diff --git a/lib/bindings/metrics.h b/lib/bindings/metrics.h
deleted file mode 100644
index 048579b..0000000
--- a/lib/bindings/metrics.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/** @file
- *
- *  A brief file description
- *
- *  @section license License
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you 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
- *
- *      http://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.
- */
-
-#pragma once
-
-// Create a new metrics binding userdata object.
-int lua_metrics_new(const char *prefix, lua_State *L);
-
-// Register metrics binding type metatable.
-void lua_metrics_register(lua_State *L);
-
-// Install new metrics objects into the global namespace. This function
-// iterates over all the registered metrics and installs a metrics
-// object at the global name given by the metric's prefix. For example,
-// if the metric is named "proxy.my.great.counter", it would install
-// a metrics object at the global name "proxy.my.great".
-int lua_metrics_install(lua_State *L);
diff --git a/proxy/config/Makefile.am b/proxy/config/Makefile.am
index d2e7dfb..1670ad2 100644
--- a/proxy/config/Makefile.am
+++ b/proxy/config/Makefile.am
@@ -32,7 +32,6 @@ dist_sysconf_DATA =   \
        ip_allow.config.default \
        log_hosts.config.default \
        logging.config.default \
-       metrics.config.default \
        parent.config.default \
        plugin.config.default \
        remap.config.default \
diff --git a/proxy/config/metrics.config.default 
b/proxy/config/metrics.config.default
deleted file mode 100644
index af2635b..0000000
--- a/proxy/config/metrics.config.default
+++ /dev/null
@@ -1,71 +0,0 @@
--- Dynamic metrics.
--- This file is processed by Traffic Manager to evaluate dynamic metric 
definitions.
-
--- Lua API.
---
--- integer(NAME, FUNC), counter(NAME, FUNC), float(NAME, FUNC)
---    These global functions register a metric of the corresponding name. Each
---    registered metric will be periodically recalculated by evaluating the
---    given function.
---
---    The name of the metric is passed to evaluation function on each 
invocation.
---    This can be used to greate a unique key for persisting data in global 
tables.
-
---
--- HTTP Cache.
---
-counter 'proxy.process.http.user_agent_total_request_bytes' [[
-  return proxy.process.http.user_agent_request_document_total_size +
-    proxy.process.http.user_agent_request_header_total_size
-]]
-
-counter 'proxy.process.http.user_agent_total_response_bytes' [[
-  return proxy.process.http.user_agent_response_document_total_size +
-    proxy.process.http.user_agent_response_header_total_size
-]]
-
-counter 'proxy.process.http.origin_server_total_request_bytes' [[
-  return proxy.process.http.origin_server_request_document_total_size +
-    proxy.process.http.origin_server_request_header_total_size
-]]
-
-counter 'proxy.process.http.origin_server_total_response_bytes' [[
-  return proxy.process.http.origin_server_response_document_total_size +
-    proxy.process.http.origin_server_response_header_total_size
-]]
-
--- Add up the downstream (client <-> proxy) traffic volume.
-counter 'proxy.process.user_agent_total_bytes' [[
-  return proxy.process.http.user_agent_total_request_bytes +
-    proxy.process.http.user_agent_total_response_bytes
-]]
-
--- Add up the upstream (client <-> proxy) traffic volume.
-counter 'proxy.process.origin_server_total_bytes' [[
-  return proxy.process.http.origin_server_total_request_bytes +
-    proxy.process.http.origin_server_total_response_bytes +
-    proxy.process.http.parent_proxy_request_total_bytes +
-    proxy.process.http.parent_proxy_response_total_bytes
-]]
-
-counter 'proxy.process.cache_total_hits' [[
-  return proxy.process.http.cache_hit_fresh +
-    proxy.process.http.cache_hit_revalidated +
-    proxy.process.http.cache_hit_ims +
-    proxy.process.http.cache_hit_stale_served
-]]
-
-counter 'proxy.process.cache_total_misses' [[
-  return
-    proxy.process.http.cache_miss_cold            +
-    proxy.process.http.cache_miss_changed         +
-    proxy.process.http.cache_miss_client_no_cache +
-    proxy.process.http.cache_miss_ims             +
-    proxy.process.http.cache_read_error
-]]
-
-integer 'proxy.process.current_server_connections' [[
-  return
-    proxy.process.http.current_server_connections +
-    proxy.process.http.current_parent_proxy_connections
-]]
diff --git a/tests/README.md b/tests/README.md
index 4fc365d..fa1c486 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -7,7 +7,7 @@ This directory contains different tests for Apache 
Trafficserver. It is recommen
 The current layout is:
 
 **gold_tests/** - contains all the TSQA v4 based tests that run on the 
Reusable Gold Testing System (AuTest)
-**tools/** - contain programs used to help with testing. 
+**tools/** - contain programs used to help with testing.
 
 In the future a directory called **"unit/"** will be added for adding unit 
tests based on some standardized testing system.
 
@@ -28,7 +28,7 @@ AuTest can be install manually instead of using the wrapper 
script. The advange
 1. run the bootstrap script then source the path with a "source 
./env-test/bin/activate" command. At this point autest command should run 
without the wrapper script
 2. The other way is to make sure you install python 3.5 or better on your 
system. From there install these python packages ( ie pip install ):
   - hyper
-  - git+https://bitbucket.org/dragon512/reusable-gold-testing-system.git 
+  - git+https://bitbucket.org/dragon512/reusable-gold-testing-system.git
 
 # Writting tests for AuTest
 When writting for the AuTest system please refer to the current documenation 
on the [online 
wiki](https://bitbucket.org/dragon512/reusable-gold-testing-system/wiki/Home) 
for general use of the system.
@@ -60,15 +60,15 @@ tr=Test.AddTestRun()
 tr.Processes.Default.Command='traffic_ctl'
 tr.Processes.Default.ReturnCode=0
 # set the environment for traffic_control to run in to be the same as the "ts" 
ATS instance
-tr.Processes.Default.Env=ts.Env 
+tr.Processes.Default.Env=ts.Env
 ```
 
 #### Variables
-These are the current variable that are define dynamically 
+These are the current variable that are define dynamically
 
-port - the ipv4 port to listen on  
-portv6 - the ipv4 port to listen on  
-manager_port - the manager port used. This is set even is select_port is False 
 
+port - the ipv4 port to listen on
+portv6 - the ipv4 port to listen on
+manager_port - the manager port used. This is set even is select_port is False
 admin_port - the admin port used. This is set even is select_port is False
 
 #### File objects
@@ -78,7 +78,7 @@ A number of file object are define to help with adding values 
to a given configu
  * squid.log
  * error.log
  * diags.log
-    
+
 ##### config files
  * records.config
  * cache.config
@@ -87,7 +87,6 @@ A number of file object are define to help with adding values 
to a given configu
  * ip_allow.config
  * log_hosts.config
  * logging.config
- * metrics.config
  * parent.config
  * plugin.config
  * remap.config
@@ -124,7 +123,7 @@ Add value to a configuration file
 # setup some config file for this server
 ts.Disk.records_config.update({
             'proxy.config.body_factory.enable_customizations': 3,  # enable 
domain specific body factory
-            'proxy.config.http.cache.generation':-1, # Start with cache turned 
off 
+            'proxy.config.http.cache.generation':-1, # Start with cache turned 
off
             'proxy.config.config_update_interval_ms':1,
         })
 ts.Disk.plugin_config.AddLine('xdebug.so')
@@ -150,7 +149,7 @@ This function copies a given configuration file the 
location of a given traffics
 
 #### Examples
 
-Copy a file over 
+Copy a file over
 
 ```python
 ts1 = Test.MakeATSProcess("ts1",select_ports=False)
@@ -168,9 +167,9 @@ 
Test.Setup.ts.CopyConfig('config/records_8090.config','records.config',Test.Proc
 ## Setting up Origin Server
 ### Test.MakeOriginServer(Name)
  * name - A name for this instance of Origin Server.
- 
+
  This function returns a AuTest process object that launches the python-based 
microserver. Micro-Server is a mock server which responds to client http 
requests. Microserver needs to be setup for the tests that require an origin 
server behind ATS. The server reads a JSON-formatted data file that contains 
request headers and the corresponding response headers. Microserver responds 
with payload if the response header contains Content-Length or 
Transfer-Enconding specified.
- 
+
 ### addResponse(filename, request_header, response_header)
 * filename - name of the file where the request header and response header 
will be written to in JSON format
 * request_header - dictionary of request header
@@ -202,12 +201,12 @@ ts.Disk.remap_config.AddLine(
  This function returns a AuTest process object that launches the python-based 
microDNS (uDNS). uDNS is a mock DNS which responds to DNS queries. uDNS needs 
to be setup for the tests that require made-up domains. The server reads a 
JSON-formatted data file that contains mappings of domain to IP addresses. uDNS 
responds with the approriate IP addresses if the requested domain is in uDNS' 
mappings.
 
  * addRecords(records=None, jsonFile=None)
- 
- This function adds records using either a dictionary, *records*, or a json 
file, *jsonFile*.  
 
- The supplied dictionary must be in the form of ```{ 'domain A': [IP1, IP2], 
'domain B': [IP3, IP4] }```.  
+ This function adds records using either a dictionary, *records*, or a json 
file, *jsonFile*.
 
- The supplied json file must take the form of 
+ The supplied dictionary must be in the form of ```{ 'domain A': [IP1, IP2], 
'domain B': [IP3, IP4] }```.
+
+ The supplied json file must take the form of
  ```
  {
      "mappings": [
@@ -220,7 +219,7 @@ ts.Disk.remap_config.AddLine(
  ### Examples
  There are 3 ways to utilize uDNS -
 
- Easy way if everything is done on localhost - by adding default option to 
Test.MakeDNServer:  
+ Easy way if everything is done on localhost - by adding default option to 
Test.MakeDNServer:
  *uDNS by default returns NXDOMAIN for any unknown mappings*
 
  ```python
@@ -274,7 +273,7 @@ ts.Disk.remap_config.AddLine(
 ## Condition Testing
 ### Condition.HasATSFeature(feature)
  * feature - The feature to test for
- 
+
  This function tests for Traffic server for possible feature it has been 
compiled with. Current Features you can test for are:
  * TS_HAS_LIBZ
  * TS_HAS_LZMA
@@ -305,7 +304,7 @@ ts.Disk.remap_config.AddLine(
  * TS_HAS_TESTS
  * TS_HAS_WCCP
  * SPLIT_DNS
-                                
+
 ### Example
 ```python
 #create the origin server process
@@ -316,9 +315,9 @@ Test.SkipUnless(
 
 ### Condition.HasCurlFeature(feature)
  * feature - The feature to test for
- 
+
  This function tests for Curl for possible feature it has been compiled with. 
Consult Curl documenation for feature set.
-                                
+
 ### Example
 ```python
 #create the origin server process
@@ -329,9 +328,9 @@ Test.SkipUnless(
 
 ### Condition.PluginExists(pluginname)
  * pluginname - The plugin to test for
- 
+
  This function tests for existence of a certain plugin in TrafficServer.
-                                
+
 ### Example
 ```python
 Test.SkipUnless(
diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext 
b/tests/gold_tests/autest-site/trafficserver.test.ext
index dad3cc6..c5d7be9 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -211,10 +211,6 @@ def MakeATSProcess(obj, name, command='traffic_server', 
select_ports=True):
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
 
-    fname = "metrics.config"
-    tmpname = os.path.join(config_dir, fname)
-    p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
-
     fname = "parent.config"
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")

-- 
To stop receiving notification emails like this one, please contact
zw...@apache.org.

Reply via email to