Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
null
ceph-main/src/test/client/TestClient.h
// -*- 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) 2021 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
4,990
32.05298
98
h
null
ceph-main/src/test/client/alternate_name.cc
// -*- 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) 2021 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
6,354
31.09596
110
cc
null
ceph-main/src/test/client/iozone.sh
#!/usr/bin/env bash set -e name=`echo $0 | sed 's/\//_/g'` mkdir $name cd $name iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1 iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1 iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1 cd ..
238
17.384615
49
sh
null
ceph-main/src/test/client/kernel_untar_build.sh
#!/usr/bin/env bash set -e name=`echo $0 | sed 's/\//_/g'` mkdir $name cd $name tar jxvf /root/linux* cd linux* make defconfig make cd .. rm -r linux*
153
10
31
sh
null
ceph-main/src/test/client/main.cc
// -*- 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) 2011 New Dream Network * Copyright (C) 2016 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Les...
820
27.310345
108
cc
null
ceph-main/src/test/client/ops.cc
// -*- 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) 2022 Red Hat * * 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,342
28.195652
89
cc
null
ceph-main/src/test/cls_2pc_queue/test_cls_2pc_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/2pc_queue/cls_2pc_queue_types.h" #include "cls/2pc_queue/cls_2pc_queue_client.h" #include "cls/queue/cls_queue_client.h" #include "cls/2pc_queue/cls_2pc_queue_types.h" #include "...
35,982
36.134159
130
cc
null
ceph-main/src/test/cls_cas/test_cls_cas.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "include/stringify.h" #include "cls/cas/cls_cas_client.h" #include "cls/cas/cls_cas_internal.h" #include "include/utime.h" #include "common/Clock.h" #include "global/global_context.h" ...
8,706
22.596206
81
cc
null
ceph-main/src/test/cls_cmpomap/test_cls_cmpomap.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licen...
27,120
36.615811
95
cc
null
ceph-main/src/test/cls_hello/test_cls_hello.cc
// -*- 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) 2013 Inktank * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
9,493
32.429577
91
cc
null
ceph-main/src/test/cls_journal/test_cls_journal.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "cls/journal/cls_journal_client.h" #include "include/stringify.h" #include "common/Cond.h" #include "test/librados/test_cxx.h" #include "gtest/gtest.h" #include <errno.h> #include <set> #include <string> using n...
22,225
30.933908
81
cc
null
ceph-main/src/test/cls_lock/test_cls_lock.cc
// -*- 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 ...
16,880
27.611864
97
cc
null
ceph-main/src/test/cls_log/test_cls_log.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/log/cls_log_types.h" #include "cls/log/cls_log_client.h" #include "include/utime.h" #include "common/Clock.h" #include "global/global_context.h" #include "gtest/gtest.h" #include...
9,906
24.665803
105
cc
null
ceph-main/src/test/cls_lua/test_cls_lua.cc
#include <errno.h> #include <lua.hpp> #include "include/types.h" #include "include/rados/librados.hpp" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include "cls/lua/cls_lua_client.h" #include "cls/lua/cls_lua.h" using namespace std; /* * JSON script to test JSON I/O protocol with cls_lua */ const s...
29,635
25.723174
109
cc
null
ceph-main/src/test/cls_numops/test_cls_numops.cc
/* * Ceph - scalable distributed file system * * Copyright (C) 2015 CERN * * Author: Joaquim Rocha <joaquim.rocha@cern.ch> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; ei...
9,859
22.759036
79
cc
null
ceph-main/src/test/cls_queue/test_cls_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/queue/cls_queue_types.h" #include "cls/queue/cls_queue_client.h" #include "cls/queue/cls_queue_ops.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include "globa...
19,661
31.338816
126
cc
null
ceph-main/src/test/cls_rbd/test_cls_rbd.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/compat.h" #include "common/ceph_context.h" #include "common/config.h" #include "common/snap_types.h" #include "common/Clock.h" #include "common/bit_vector.hpp" #include "include/encoding.h" #include "inc...
125,005
35.455526
106
cc
null
ceph-main/src/test/cls_refcount/test_cls_refcount.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/refcount/cls_refcount_client.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include <errno.h> #include <string> #include <vector> using namespace std; static ...
18,789
23.120668
119
cc
null
ceph-main/src/test/cls_rgw/test_cls_rgw.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/rgw/cls_rgw_client.h" #include "cls/rgw/cls_rgw_ops.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include "global/global_context.h" #include "common/ceph_contex...
40,907
29.460164
120
cc
null
ceph-main/src/test/cls_rgw/test_cls_rgw_stats.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <vector> #include <boost/circular_buffer.hpp> #include <boost/intrusive/set.hpp> #include <gtest/gtest.h> #include "cls/rgw/cls_rgw_client.h" #include "common/debug.h" #include "common/dout.h" #include "common/er...
20,798
31.146832
81
cc
null
ceph-main/src/test/cls_rgw_gc/test_cls_rgw_gc.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/types.h" #include "cls/rgw/cls_rgw_types.h" #include "cls/rgw_gc/cls_rgw_gc_client.h" #include "cls/rgw_gc/cls_rgw_gc_ops.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #include "globa...
19,975
27.496434
119
cc
null
ceph-main/src/test/cls_sdk/test_cls_sdk.cc
#include <iostream> #include <errno.h> #include "test/librados/test_cxx.h" #include "gtest/gtest.h" using namespace librados; TEST(ClsSDK, TestSDKCoverageWrite) { Rados cluster; std::string pool_name = get_temp_pool_name(); ASSERT_EQ("", create_one_pool_pp(pool_name, cluster)); IoCtx ioctx; cluster.ioctx_c...
984
26.361111
79
cc
null
ceph-main/src/test/cls_version/test_cls_version.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "include/rados/librados.hpp" #include "include/types.h" #include "cls/version/cls_version_types.h" #include "cls/version/cls_version_client.h" #include "gtest/gtest.h" #include "test/librados/test_cxx.h" #incl...
7,728
22.928793
70
cc
null
ceph-main/src/test/common/ObjectContents.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #include "ObjectContents.h" #include "include/buffer.h" #include <iostream> #include <map> bool test_object_contents() { ObjectContents c, d; ceph_assert(!c.exists()); c.debug(std::cerr); c.write(10, 10, 10); ceph_assert(c.exists()); ce...
3,150
23.426357
72
cc
null
ceph-main/src/test/common/ObjectContents.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- #include "include/interval_set.h" #include "include/buffer_fwd.h" #include <map> #ifndef COMMON_OBJECT_H #define COMMON_OBJECT_H enum { RANDOMWRITEFULL, DELETED, CLONERANGE }; bool test_object_contents(); class ObjectContents { uint64_t ...
2,837
22.073171
70
h
null
ceph-main/src/test/common/Readahead.cc
// -*- 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) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
5,616
41.233083
95
cc
null
ceph-main/src/test/common/Throttle.cc
// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This program is free software; you can redistribute it an...
9,135
22.607235
71
cc
null
ceph-main/src/test/common/dns_messages.h
// -*- 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) 2016 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
5,042
48.930693
80
h
null
ceph-main/src/test/common/dns_resolve.cc
// -*- 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) 2016 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
8,965
32.962121
93
cc
null
ceph-main/src/test/common/get_command_descriptions.cc
// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This program is free software; you can redistribute it an...
4,018
29.44697
83
cc
null
ceph-main/src/test/common/histogram.cc
// -*- 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) 2014 Inktank <info@inktank.com> * * LGPL-2.1 (see COPYING-LGPL2.1) or later */ #include <iostream> #include <gtest/gtest.h> #include "common/histogram....
2,478
18.069231
70
cc
null
ceph-main/src/test/common/test_allocate_unique.cc
// -*- 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) 2020 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
2,523
24.755102
81
cc
null
ceph-main/src/test/common/test_async_completion.cc
// -*- 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) 2018 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
6,662
24.92607
87
cc
null
ceph-main/src/test/common/test_async_shared_mutex.cc
// -*- 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) 2018 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
10,729
24.011655
78
cc
null
ceph-main/src/test/common/test_back_trace.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <boost/algorithm/string.hpp> #include <gtest/gtest.h> #include <regex> #include <sstream> #include <string> #include "common/BackTrace.h" #include "common/version.h" // a dummy function, so we can check "foo" i...
1,219
26.111111
77
cc
null
ceph-main/src/test/common/test_bit_vector.cc
// -*- 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) 2014 Red Hat <contact@redhat.com> * * LGPL-2.1 (see COPYING-LGPL2.1) or later */ #include <gtest/gtest.h> #include <cmath> #include "common/bit_vector.h...
9,607
30.093851
80
cc
null
ceph-main/src/test/common/test_blkdev.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <string.h> #include <errno.h> #include <stdlib.h> #include <linux/kdev_t.h> #include "include/types.h" #include "common/blkdev.h" #include "gtest/gtest.h" #include "gmock/gmock.h" #include <iostream> using nam...
2,842
23.721739
125
cc
null
ceph-main/src/test/common/test_blocked_completion.cc
// -*- 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) 2018 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
6,678
27.063025
89
cc
null
ceph-main/src/test/common/test_bloom_filter.cc
// -*- 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) 2013 Inktank <info@inktank.com> * * LGPL-2.1 (see COPYING-LGPL2.1) or later */ #include <iostream> #include <gtest/gtest.h> #include "include/stringify...
8,924
26.546296
119
cc
null
ceph-main/src/test/common/test_bounded_key_counter.cc
// -*- 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) 2015 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
6,744
32.557214
77
cc
null
ceph-main/src/test/common/test_cdc.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <vector> #include <cstring> #include <random> #include "include/types.h" #include "include/buffer.h" #include "common/CDC.h" #include "gtest/gtest.h" using namespace std; class CDCTest : public ::testing::Tes...
4,405
25.865854
313
cc
null
ceph-main/src/test/common/test_ceph_timer.cc
// -*- 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) 2020 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
3,547
20.634146
70
cc
null
ceph-main/src/test/common/test_config.cc
// -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This program is free software; you can redistribute it an...
10,802
33.404459
85
cc
null
ceph-main/src/test/common/test_context.cc
// -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This program is free software; you can redistribute it an...
4,922
32.719178
315
cc
null
ceph-main/src/test/common/test_convenience.cc
// -*- 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) 2017 Red Hat, Inc. * * Author: Casey Bodley <cbodley@redhat.com> * * This is free software; you can redistribute it and/or * modify it under the terms ...
1,756
24.1
81
cc
null
ceph-main/src/test/common/test_counter.cc
#include "common/DecayCounter.h" #include <gtest/gtest.h> #include <list> #include <cmath> TEST(DecayCounter, steady) { static const double duration = 2.0; static const double max = 2048.0; static const double rate = 3.5; DecayCounter d{DecayRate{rate}}; d.hit(max); const auto start = DecayCounter::cloc...
998
23.365854
74
cc
null
ceph-main/src/test/common/test_crc32c.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include <string.h> #include "include/types.h" #include "include/crc32c.h" #include "include/utime.h" #include "common/Clock.h" #include "gtest/gtest.h" #include "common/sctp_crc32.h" #include "comm...
19,624
52.620219
97
cc
null
ceph-main/src/test/common/test_fair_mutex.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- #include <array> #include <mutex> #include <numeric> #include <future> #include <gtest/gtest.h> #include "common/fair_mutex.h" TEST(FairMutex, simple) { ceph::fair_mutex mutex{"fair::simple"}; { std::unique_lock lock{mutex}; ASSERT_T...
2,229
31.318841
81
cc
null
ceph-main/src/test/common/test_fault_injector.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licen...
6,477
25.016064
79
cc
null
ceph-main/src/test/common/test_global_doublefree.cc
// -*- 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) 2016 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
863
26.870968
78
cc
null
ceph-main/src/test/common/test_hobject.cc
#include "common/hobject.h" #include "gtest/gtest.h" TEST(HObject, cmp) { hobject_t c{object_t{"fooc"}, "food", CEPH_NOSNAP, 42, 0, "nspace"}; hobject_t d{object_t{"food"}, "", CEPH_NOSNAP, 42, 0, "nspace"}; hobject_t e{object_t{"fooe"}, "food", CEPH_NOSNAP, 42, 0, "nspace"}; ASSERT_EQ(-1, cmp(c, d)); AS...
346
27.916667
70
cc
null
ceph-main/src/test/common/test_hostname.cc
// -*- 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 P...
1,907
25.5
81
cc
null
ceph-main/src/test/common/test_interval_map.cc
// -*- 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) 2016 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2....
8,143
23.094675
77
cc
null
ceph-main/src/test/common/test_interval_set.cc
// -*- 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) 2015 Mirantis, Inc. * * Author: Igor Fedotov <ifedotov@mirantis.com> * * This is free software; you can redistribute it and/or * modify it under the te...
17,188
27.600666
91
cc
null
ceph-main/src/test/common/test_intrusive_lru.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <stdio.h> #include "gtest/gtest.h" #include "common/intrusive_lru.h" template <typename TestLRUItem> struct item_to_unsigned { using type = unsigned; const type &operator()(const TestLRUItem &item) { ret...
4,551
20.779904
70
cc
null
ceph-main/src/test/common/test_iso_8601.cc
// -*- 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) 2017 Red Hat <contact@redhat.com> * * LGPL-2.1 (see COPYING-LGPL2.1) or later */ #include <chrono> #include <gtest/gtest.h> #include "common/ceph_time...
1,913
30.377049
77
cc
null
ceph-main/src/test/common/test_journald_logger.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <cerrno> #include <gtest/gtest.h> #include <sys/stat.h> #include "common/Journald.h" #include "log/Entry.h" #include "log/SubsystemMap.h" using namespace ceph::logging; class JournaldLoggerTest : public ::test...
1,007
23
70
cc
null
ceph-main/src/test/common/test_json_formattable.cc
// -*- 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) 2018 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * L...
10,548
22.235683
106
cc
null
ceph-main/src/test/common/test_json_formatter.cc
// -*- 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) 2018 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * L...
4,218
50.45122
2,322
cc
null
ceph-main/src/test/common/test_lockdep.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "gtest/gtest.h" #include "common/ceph_argparse.h" #include "common/ceph_context.h" #include "common/ceph_mutex.h" #include "common/common_init.h" #include "common/lockdep.h" #include "include/util.h" #include "i...
1,749
22.333333
86
cc
null
ceph-main/src/test/common/test_lru.cc
// -*- 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) 2014 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com> * * This library is free software; ...
4,085
24.698113
70
cc
null
ceph-main/src/test/common/test_lruset.cc
// -*- 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) 2013 Inktank <info@inktank.com> * * LGPL-2.1 (see COPYING-LGPL2.1) or later */ #include <iostream> #include <gtest/gtest.h> #include "common/LRUSet.h" ...
1,998
17.172727
70
cc
null
ceph-main/src/test/common/test_mclock_priority_queue.cc
// -*- 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) 2017 Red Hat Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License versi...
7,214
21.476636
78
cc
null
ceph-main/src/test/common/test_mutex_debug.cc
// -*- 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) 2011 New Dream Network * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License versio...
2,399
22.529412
70
cc
null
ceph-main/src/test/common/test_numa.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "gtest/gtest.h" #include "common/numa.h" TEST(cpu_set, parse_list) { cpu_set_t cpu_set; size_t size; ASSERT_EQ(0, parse_cpu_set_list("0-3", &size, &cpu_set)); ASSERT_EQ(size, 4u); for (unsigned i = 0;...
1,942
25.616438
70
cc
null
ceph-main/src/test/common/test_option.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- // vim: ts=8 sw=2 smarttab expandtab #include <string.h> #include <errno.h> #include <stdlib.h> #include <gtest/gtest.h> #include "common/options.h" using namespace std; TEST(Option, validate_min_max) { auto opt = Option{"foo", Option::TYPE...
1,707
22.081081
74
cc
null
ceph-main/src/test/common/test_perf_counters_key.cc
#include "common/perf_counters_key.h" #include <gtest/gtest.h> namespace ceph::perf_counters { TEST(PerfCounters, key_create) { EXPECT_EQ(key_create(""), std::string_view("\0", 1)); EXPECT_EQ(key_create("perf"), std::string_view("perf\0", 5)); EXPECT_EQ(key_create("perf", {{"",""}}), ...
3,984
29.653846
73
cc
null
ceph-main/src/test/common/test_perf_histogram.cc
// -*- 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) 2017 OVH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License version 2, as publis...
8,897
34.879032
97
cc
null
ceph-main/src/test/common/test_pretty_binary.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/pretty_binary.h" #include "gtest/gtest.h" TEST(pretty_binary, print) { ASSERT_EQ(pretty_binary_string(std::string("foo\001\002bars")), std::string("'foo'0x0102'bars'")); ASSERT_EQ(pretty_binary_stri...
2,046
39.137255
110
cc
null
ceph-main/src/test/common/test_prioritized_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "gtest/gtest.h" #include "common/PrioritizedQueue.h" #include <numeric> #include <vector> #include <algorithm> #include <random> using std::vector; class PrioritizedQueueTest : public testing::Test { protected...
6,136
28.647343
77
cc
null
ceph-main/src/test/common/test_rabin_chunk.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <vector> #include <cstring> #include <random> #include "include/types.h" #include "include/buffer.h" #include "common/rabin.h" #include "gtest/gtest.h" TEST(Rabin, rabin_hash_simple) { uint64_t expected = 68...
3,706
23.388158
76
cc
null
ceph-main/src/test/common/test_random.cc
// -*- 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) 2017 SUSE LINUX GmbH * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License ve...
6,051
23.502024
87
cc
null
ceph-main/src/test/common/test_safe_io.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <algorithm> #include <cstring> #include <fcntl.h> #include <unistd.h> #include "common/safe_io.h" #include "gtest/gtest.h" TEST(SafeIO, safe_read_file) { const char *fname = "safe_read_testfile"; ::unlink...
961
24.315789
78
cc
null
ceph-main/src/test/common/test_shared_cache.cc
// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * Cheng Cheng <ccheng.leo@gmail.com> * * This progra...
10,749
25.80798
128
cc
null
ceph-main/src/test/common/test_sharedptr_registry.cc
// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This program is free software; you can redistribute it an...
9,518
27.758308
140
cc
null
ceph-main/src/test/common/test_shunique_lock.cc
// -*- 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) 2011 New Dream Network * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License versio...
13,996
23.300347
77
cc
null
ceph-main/src/test/common/test_sloppy_crc_map.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <iostream> #include "common/SloppyCRCMap.h" #include "common/Formatter.h" #include <gtest/gtest.h> using namespace std; void dump(const SloppyCRCMap& scm) { auto f = Formatter::create_unique("json-pretty"); ...
2,761
22.606838
76
cc
null
ceph-main/src/test/common/test_split.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2019 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
2,923
23.366667
74
cc
null
ceph-main/src/test/common/test_static_ptr.cc
// -*- 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) 2017 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License vers...
5,651
25.046083
85
cc
null
ceph-main/src/test/common/test_str_map.cc
// -*- 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) 2013 Cloudwatt <libre.licensing@cloudwatt.com> * * Author: Loic Dachary <loic@dachary.org> * * This library is free software; you can redistribute it ...
2,485
26.622222
97
cc
null
ceph-main/src/test/common/test_tableformatter.cc
#include "gtest/gtest.h" #include "common/Formatter.h" #include <iostream> #include <sstream> #include <string> using namespace ceph; TEST(tableformatter, singleline) { std::stringstream sout; TableFormatter formatter; formatter.dump_int("integer", 10); formatter.dump_float("float", 10.0); formatter.dump_s...
7,420
27.109848
78
cc
null
ceph-main/src/test/common/test_time.cc
// -*- 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 ...
7,094
29.063559
87
cc
null
ceph-main/src/test/common/test_url_escape.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "common/url_escape.h" #include "gtest/gtest.h" TEST(url_escape, escape) { ASSERT_EQ(url_escape("foo bar"), std::string("foo%20bar")); ASSERT_EQ(url_escape("foo\nbar"), std::string("foo%0abar")); } TEST(url...
1,134
29.675676
70
cc
null
ceph-main/src/test/common/test_util.cc
// -*- 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) 2011 New Dream Network * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License versio...
1,025
22.860465
71
cc
null
ceph-main/src/test/common/test_weighted_priority_queue.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "gtest/gtest.h" #include "common/Formatter.h" #include "common/WeightedPriorityQueue.h" #include <numeric> #include <vector> #include <map> #include <list> #include <tuple> #define CEPH_OP_CLASS_STRICT 0 #defin...
7,795
31.348548
76
cc
null
ceph-main/src/test/common/test_xmlformatter.cc
#include "gtest/gtest.h" #include "common/Formatter.h" #include <sstream> #include <string> using namespace ceph; TEST(xmlformatter, oneline) { std::stringstream sout; XMLFormatter formatter; formatter.dump_int("integer", 10); formatter.dump_float("float", 10.0); formatter.dump_string("string", "string")...
4,221
24.433735
84
cc
null
ceph-main/src/test/compressor/compressor_example.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph distributed storage system * * Copyright (C) 2015 Mirantis, Inc. * * Author: Alyona Kiseleva <akiselyova@mirantis.com> * * * This library is free software; you can redistribute it and/or * modify it u...
1,442
25.722222
139
h
null
ceph-main/src/test/compressor/compressor_plugin_example.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph distributed storage system * * Copyright (C) 2015 Mirantis, Inc. * * Author: Alyona Kiseleva <akiselyova@mirantis.com> * * This library is free software; you can redistribute it and/or * modify it unde...
1,555
24.933333
80
cc
null
ceph-main/src/test/compressor/test_compression.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph distributed storage system * * Copyright (C) 2015 Mirantis, Inc. * * Author: Alyona Kiseleva <akiselyova@mirantis.com> * * This library is free software; you can redistribute it and/or * modify it under...
17,393
27.375204
109
cc
null
ceph-main/src/test/compressor/osdmaps/osdmap.2982809.h
unsigned char osdmap_a[] = { 0x8,0x7,0xdf,0x56,0x9,0x0,0x7,0x1,0x91,0x47,0x5,0x0,0xb4,0xf4,0x63,0xa0, 0xc6,0x71,0x43,0xa8,0xbd,0x36,0xe4,0xa,0xb8,0xd2,0x33,0xd2,0x99,0x83,0x2d,0x0, 0x6d,0x34,0x16,0x52,0xe8,0x59,0x97,0x1c,0xa,0x4d,0x4e,0x5e,0x13,0x5c,0x3b,0x35, 0x4,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1b,0x5,0x...
2,692,799
69.385279
80
h
null
ceph-main/src/test/crimson/gtest_seastar.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include <cstdlib> #include <iostream> #include "include/ceph_assert.h" #include "gtest_seastar.h" #include "common/ceph_argparse.h" #include "crimson/common/config_proxy.h" #include "crimson/common/perf_counters_collec...
1,903
27.848485
80
cc
null
ceph-main/src/test/crimson/gtest_seastar.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include "gtest/gtest.h" #include "seastar_runner.h" struct seastar_test_suite_t : public ::testing::Test { static SeastarRunner seastar_env; template <typename Func> void run(Func &&func) { ret...
856
22.805556
70
h
null
ceph-main/src/test/crimson/seastar_runner.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #pragma once #include <stdio.h> #include <signal.h> #include <thread> #include <seastar/core/app-template.hh> #include <seastar/core/future-util.hh> #include <seastar/core/reactor.hh> #include <seastar/core/alien.hh> #i...
2,398
22.291262
72
h
null
ceph-main/src/test/crimson/test_alien_echo.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- #include "auth/Auth.h" #include "messages/MPing.h" #include "common/ceph_argparse.h" #include "crimson/auth/DummyAuth.h" #include "crimson/common/throttle.h" #include "crimson/net/Connection.h" #include "crimson/net/Dispatcher.h" #include "crimso...
9,806
32.244068
92
cc
null
ceph-main/src/test/crimson/test_alienstore_thread_pool.cc
#include <chrono> #include <iostream> #include <numeric> #include <seastar/core/app-template.hh> #include "common/ceph_argparse.h" #include "crimson/common/config_proxy.h" #include "crimson/os/alienstore/thread_pool.h" #include "include/msgr.h" using namespace std::chrono_literals; using ThreadPool = crimson::os::Thre...
2,373
29.050633
110
cc
null
ceph-main/src/test/crimson/test_async_echo.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- #include <boost/program_options/variables_map.hpp> #include <boost/program_options/parsers.hpp> #include "auth/Auth.h" #include "global/global_init.h" #include "messages/MPing.h" #include "msg/Dispatcher.h" #include "msg/Messenger.h" #include "...
7,051
29.008511
94
cc
null
ceph-main/src/test/crimson/test_backfill.cc
#include <algorithm> #include <cstdlib> #include <deque> #include <functional> #include <initializer_list> #include <iostream> #include <iterator> #include <limits> #include <map> #include <set> #include <string> #include <boost/statechart/event_base.hpp> #include <gmock/gmock.h> #include <gtest/gtest.h> #include "co...
14,609
28.103586
95
cc
null
ceph-main/src/test/crimson/test_buffer.cc
#include <iostream> #include <seastar/core/app-template.hh> #include <seastar/core/future-util.hh> #include <seastar/core/reactor.hh> #include "include/buffer.h" // allocate a foreign buffer on each cpu, collect them all into a bufferlist, // and destruct it on this cpu seastar::future<> test_foreign_bufferlist() { ...
1,534
29.098039
82
cc
null
ceph-main/src/test/crimson/test_config.cc
#include <chrono> #include <string> #include <numeric> #include <seastar/core/app-template.hh> #include <seastar/core/sharded.hh> #include "common/ceph_argparse.h" #include "common/config_obs.h" #include "crimson/common/config_proxy.h" using namespace std::literals; using Config = crimson::common::ConfigProxy; const s...
3,436
30.245455
87
cc
null
ceph-main/src/test/crimson/test_denc.cc
#include <string> #include <seastar/core/temporary_buffer.hh> #include <gtest/gtest.h> #include "include/denc.h" #include "common/buffer_seastar.h" using temporary_buffer = seastar::temporary_buffer<char>; using buffer_iterator = seastar_buffer_iterator; using const_buffer_iterator = const_seastar_buffer_iterator; te...
1,119
19.740741
60
cc