]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
remove ceph_streamtest
authorSage Weil <sage@redhat.com>
Wed, 23 Dec 2015 15:38:08 +0000 (10:38 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:29 +0000 (13:07 -0500)
This is an ancient obsolete test that is never used.

Signed-off-by: Sage Weil <sage@redhat.com>
ceph.spec.in
debian/ceph-test.install
src/.gitignore
src/test/CMakeLists.txt
src/test/Makefile-server.am
src/test/streamtest.cc [deleted file]

index fc46609d41b8cbfebae02f442b84ce4ab1f69f1e..a12163136310d73f625047e944c55f3f11ddae68 100644 (file)
@@ -1204,7 +1204,6 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_bindir}/ceph_smalliobenchdumb
 %{_bindir}/ceph_smalliobenchfs
 %{_bindir}/ceph_smalliobenchrbd
-%{_bindir}/ceph_streamtest
 %{_bindir}/ceph_test_*
 %{_bindir}/ceph_tpbench
 %{_bindir}/ceph_xattr_bench
index bcd0b017477db3ed2843f4c8a8d7604f7b66932c..a8a2a31ebf7f0c61f8961f667741739375e675a8 100644 (file)
@@ -19,7 +19,6 @@ usr/bin/ceph_smalliobench
 usr/bin/ceph_smalliobenchdumb
 usr/bin/ceph_smalliobenchfs
 usr/bin/ceph_smalliobenchrbd
-usr/bin/ceph_streamtest
 usr/bin/ceph_test_*
 usr/bin/ceph_tpbench
 usr/bin/ceph_xattr_bench
index 71c36afeeea37ee5642d094d4e09406e894fc11a..34a2e4b8c98bb19bd05a545b96ecfc7846e80dd7 100644 (file)
@@ -44,7 +44,6 @@ Makefile
 /ceph_rgw_multiparser
 /ceph_scratchtool
 /ceph_scratchtoolpp
-/ceph_streamtest
 /ceph_test_*
 /ceph_tpbench
 /ceph_xattr_bench
index 76c32c9367c6999931a1a0cffca290647fdf0cc7..1dd71ecdeffe40fb9d9a76d19ad5d9105177051f 100644 (file)
@@ -71,13 +71,6 @@ target_link_libraries(test_rewrite_latency common
   ${TCMALLOC_LIBS}
   ${CMAKE_THREAD_LIBS_INIT} ${CRYPTO_LIBS} m ${EXTRALIBS})
 
-# streamtest
-add_executable(streamtest
-  streamtest.cc
-  $<TARGET_OBJECTS:heap_profiler_objs>
-  )
-target_link_libraries(streamtest os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${TCMALLOC_LIBS})
-
 # test_trans
 add_executable(test_trans
   test_trans.cc
index 4ce1418fb81c8fadf3dbb6470e24f571d3c338ad..fc4d53dc6414d29adff6dbdd30454f7a8414635d 100644 (file)
@@ -8,10 +8,6 @@ ceph_test_msgr_LDADD = $(LIBOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
 ceph_test_msgr_CXXFLAGS = $(UNITTEST_CXXFLAGS)
 bin_DEBUGPROGRAMS += ceph_test_msgr
 
-ceph_streamtest_SOURCES = test/streamtest.cc
-ceph_streamtest_LDADD = $(LIBOS) $(CEPH_GLOBAL)
-bin_DEBUGPROGRAMS += ceph_streamtest
-
 ceph_test_trans_SOURCES = test/test_trans.cc
 ceph_test_trans_LDADD = $(LIBOS) $(CEPH_GLOBAL)
 bin_DEBUGPROGRAMS += ceph_test_trans
diff --git a/src/test/streamtest.cc b/src/test/streamtest.cc
deleted file mode 100644 (file)
index e19dbce..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
-// vim: ts=8 sw=2 smarttab
-/*
- * Ceph - scalable distributed file system
- *
- * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net>
- *
- * This is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software 
- * Foundation.  See file COPYING.
- * 
- */
-
-#include <iostream>
-#include "os/FileStore.h"
-#include "global/global_init.h"
-#include "common/ceph_argparse.h"
-#include "common/debug.h"
-
-#undef dout_prefix
-#define dout_prefix *_dout
-
-struct io {
-  utime_t start, ack, commit;
-  bool done() {
-    return ack.sec() && commit.sec();
-  }
-};
-map<off_t,io> writes;
-Cond cond;
-Mutex test_lock("streamtest.cc lock");
-
-unsigned concurrent = 1;
-void throttle()
-{ 
-  Mutex::Locker l(test_lock);
-  while (writes.size() >= concurrent) {
-    //generic_dout(0) << "waiting" << dendl;
-    cond.Wait(test_lock);
-  }
-}
-
-double total_ack = 0;
-double total_commit = 0;
-int total_num = 0;
-
-void pr(off_t off)
-{
-  io &i = writes[off];
-  if (false) cout << off << "\t" 
-       << (i.ack - i.start) << "\t"
-       << (i.commit - i.start) << std::endl;
-  total_num++;
-  total_ack += (i.ack - i.start);
-  total_commit += (i.commit - i.start);
-  writes.erase(off);
-  cond.Signal();
-}
-
-void set_start(off_t off, utime_t t)
-{
-  Mutex::Locker l(test_lock);
-  writes[off].start = t;
-}
-
-void set_ack(off_t off, utime_t t)
-{
-  Mutex::Locker l(test_lock);
-  //generic_dout(0) << "ack " << off << dendl;
-  writes[off].ack = t;
-  if (writes[off].done())
-    pr(off);
-}
-
-void set_commit(off_t off, utime_t t)
-{
-  Mutex::Locker l(test_lock);
-  //generic_dout(0) << "commit " << off << dendl;
-  writes[off].commit = t;
-  if (writes[off].done())
-    pr(off);
-}
-
-
-struct C_Ack : public Context {
-  off_t off;
-  C_Ack(off_t o) : off(o) {}
-  void finish(int r) {
-    set_ack(off, ceph_clock_now(g_ceph_context));
-  }
-};
-struct C_Commit : public Context {
-  off_t off;
-  C_Commit(off_t o) : off(o) {}
-  void finish(int r) {
-    set_commit(off, ceph_clock_now(g_ceph_context));
-  }
-};
-
-
-int main(int argc, const char **argv)
-{
-  vector<const char*> args;
-  argv_to_vec(argc, argv, args);
-  env_to_vec(args);
-
-  global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_UTILITY, 0);
-  common_init_finish(g_ceph_context);
-
-  // args
-  if (args.size() < 3) return -1;
-  const char *filename = args[0];
-  int seconds = atoi(args[1]);
-  int bytes = atoi(args[2]);
-  const char *journal = 0;
-  if (args.size() >= 4)
-    journal = args[3];
-  if (args.size() >= 5)
-    concurrent = atoi(args[4]);
-
-  cout << "concurrent = " << concurrent << std::endl;
-
-  buffer::ptr bp(bytes);
-  bp.zero();
-  bufferlist bl;
-  bl.push_back(bp);
-
-  //float interval = 1.0 / 1000;
-  
-  cout << "#dev " << filename
-       << ", " << seconds << " seconds, " << bytes << " bytes per write" << std::endl;
-
-  ObjectStore *fs = new FileStore(filename, journal);
-  
-  if (fs->mkfs() < 0) {
-    cout << "mkfs failed" << std::endl;
-    return -1;
-  }
-  
-  if (fs->mount() < 0) {
-    cout << "mount failed" << std::endl;
-    return -1;
-  }
-
-  ObjectStore::Sequencer osr(__func__);
-  ObjectStore::Transaction ft;
-  ft.create_collection(coll_t(), 0);
-  fs->apply_transaction(&osr, ft);
-
-  utime_t now = ceph_clock_now(g_ceph_context);
-  utime_t start = now;
-  utime_t end = now;
-  end += seconds;
-  off_t pos = 0;
-  //cout << "stop at " << end << std::endl;
-  cout << "# offset\tack\tcommit" << std::endl;
-  while (now < end) {
-    sobject_t poid(object_t("streamtest"), 0);
-
-    set_start(pos, ceph_clock_now(g_ceph_context));
-    ObjectStore::Transaction *t = new ObjectStore::Transaction;
-    t->write(coll_t(), ghobject_t(hobject_t(poid)), pos, bytes, bl);
-    fs->queue_transaction(NULL, t, new C_Ack(pos), new C_Commit(pos));
-    pos += bytes;
-
-    throttle();
-
-    now = ceph_clock_now(g_ceph_context);
-
-    // wait?
-    /*
-    utime_t next = start;
-    next += interval;
-    if (now < next) {
-      float s = next - now;
-      s *= 1000 * 1000;  // s -> us
-      //cout << "sleeping for " << s << " us" << std::endl;
-      usleep((int)s);
-    }
-    */
-  }
-
-  cout << "total num " << total_num << std::endl;
-  cout << "avg ack\t" << (total_ack / (double)total_num) << std::endl;
-  cout << "avg commit\t" << (total_commit / (double)total_num) << std::endl;
-  cout << "tput\t" << prettybyte_t((double)(total_num * bytes) / (double)(end-start)) << "/sec" << std::endl;
-
-  fs->umount();
-
-}
-