Skip to content

Commit

Permalink
finish updating code documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Plaza committed Mar 29, 2015
1 parent 8e75ce4 commit 698fa4c
Show file tree
Hide file tree
Showing 10 changed files with 506 additions and 423 deletions.
1 change: 0 additions & 1 deletion libdvid/DVIDNodeService.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ class DVIDNodeService {
* \param transaction specify transactions for set call
* \param leftover_vertices vertices that could not be written
*/

void set_properties(std::string graph_name,
std::vector<Edge>& edges, std::string key,
std::vector<BinaryDataPtr>& properties,
Expand Down
20 changes: 17 additions & 3 deletions load_tests/loadtest_labelblk.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*!
* This file tests the performance of creating a large
* label volume, adding it to DVID, and then doing a
* series of label blk fetches.
*
* \author Stephen Plaza ([email protected])
*/

#include <libdvid/DVIDNodeService.h>
#include <libdvid/DVIDServerService.h>
#include "ScopeTime.h"
Expand All @@ -13,10 +21,13 @@ using std::string;
// assume all blocks are BLK_SIZE in each dimension
int BLK_SIZE = 32;

// size of the segmentation to be created
int VOLDIM = 512;

// number of random fetches to do
int NUM_FETCHES = 100;

// size of the small volume gets
int SMALLFETCH = 128;

/*!
Expand Down Expand Up @@ -53,6 +64,7 @@ int main(int argc, char** argv)
}

// create binary data string wrapper (64 bits per pixel)
// calculate time to post volume
{
Dims_t dims;
dims.push_back(VOLDIM); dims.push_back(VOLDIM); dims.push_back(VOLDIM);
Expand All @@ -71,7 +83,8 @@ int main(int argc, char** argv)
<< " bytes posted per second for large label volume" << endl;
}

// retrieve the image volume and make sure it makes the posted volume
// retrieve the image volume
// this might be artifically fast as it might be completely in DVID's cache
{
vector<unsigned int> start;
start.push_back(0); start.push_back(0); start.push_back(0);
Expand All @@ -86,12 +99,13 @@ int main(int argc, char** argv)
<< " bytes read per second for large label volume" << endl;
}

// do a lot of small requests
// do a lot of small requests (like already in DVID cache)
double total_time = 0.0;
for (int i = 0; i < NUM_FETCHES; ++i) {
ScopeTime get_timer(false);
int max_val = VOLDIM - SMALLFETCH + 1;


// grab random small cube
vector<unsigned int> start;
start.push_back(rand()%max_val);
start.push_back(rand()%max_val);
Expand Down
18 changes: 13 additions & 5 deletions load_tests/loadtest_labelgraph.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*!
* This file measures the performance of loading and reading
* a large DVID labelgraph.
*
* \author Stephen Plaza ([email protected])
*/

#include <libdvid/DVIDServerService.h>
#include <libdvid/DVIDNodeService.h>

Expand All @@ -17,7 +24,8 @@ using std::vector;
using std::ifstream;

/*!
* Test labelgraph vertex and edge creation and the setting of properties.
* Measure performance of reading a large graph
* (example graph in input folder).
*/
int main(int argc, char** argv)
{
Expand All @@ -29,7 +37,8 @@ int main(int argc, char** argv)
ScopeTime overall_time;

DVIDServerService server(argv[1]);
std::string uuid = server.create_new_repo("newrepo", "This is my new repo");
std::string uuid = server.create_new_repo("newrepo",
"This is my new repo");
DVIDNodeService dvid_node(argv[1], uuid);

// name of graph to use
Expand All @@ -40,9 +49,8 @@ int main(int argc, char** argv)
cerr << graph_datatype_name << " already exists" << endl;
return -1;
}

// ?! read file
// ?! get num nodes, edges

// read graph
ifstream fin(argv[2]);
Json::Reader json_reader;
Json::Value json_graph;
Expand Down
Loading

0 comments on commit 698fa4c

Please sign in to comment.