-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephen Plaza
committed
Mar 29, 2015
1 parent
8e75ce4
commit 698fa4c
Showing
10 changed files
with
506 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
@@ -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; | ||
|
||
/*! | ||
|
@@ -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); | ||
|
@@ -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); | ||
|
@@ -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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|
||
|
@@ -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) | ||
{ | ||
|
@@ -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 | ||
|
@@ -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; | ||
|
Oops, something went wrong.