Skip to content

Commit

Permalink
db folders are now created automatically. Updated README information
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpaulo committed Aug 16, 2015
1 parent 88adcf4 commit 1576fbf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
8 changes: 8 additions & 0 deletions DEDISgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,14 @@ int main (int argc, char *argv[]){
strcpy(duplicatedbpath,DUPLICATEDB);
}

char mkcmd[200];
sprintf(mkcmd, "mkdir -p %s", printdbpath);
int ress = system(mkcmd);
sprintf(mkcmd, "mkdir -p %s", duplicatedbpath);
ress=system(mkcmd);
if(ress<0)
perror("Error creating folders for databases\n");


printf("Removing old databases\n");
//remove databases if exist
Expand Down
9 changes: 5 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ Running the generator DEDISgen:
-p<value> (Path for the folder or disk device)
-o<value> (Path for the output distribution file.
This is only necessary if distribution file of duplicates is going to be generated)
(Please specifiy the full path including the distribution file name to be generated)

Optional Parameters

Expand All @@ -160,11 +161,11 @@ Running the generator DEDISgen:

Examples

//generate duplicate distribution for files in folder /dir/duplicates/ and its subfolders
./DEDISgen -f -p/dir/duplicates/
//generate duplicate distribution file /dir/dist_file for files in folder /dir/duplicates/ and its subfolders
./DEDISgen -f -p/dir/duplicates/ -o/dir/dist_file

//generate duplicate distribution for device /path/device. Use a block size of 8192 Bytes (8KB)
./DEDISgen -d -p/path/device -b8192
//generate duplicate distribution file /dir/dist_file for device /path/device. Use a block size of 8192 Bytes (8KB)
./DEDISgen -d -p/path/device -b8192 -o/dir/dist_file


Deduplication distribution FILE:
Expand Down
10 changes: 5 additions & 5 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ run 8 minutes mixed benchmark with a nominal load (100reads/s and 50 writes/s) i

-p<value> Path for the folder or disk device

-o<value> Path for the output distribution file. This is only necessary if distribution file of duplicates is going to be generated
-o<value> Path for the output distribution file (Please specifiy the full path including the distribution file name to be generated). This is only necessary if distribution file of duplicates is going to be generated

Optional Parameters

Expand All @@ -152,13 +152,13 @@ run 8 minutes mixed benchmark with a nominal load (100reads/s and 50 writes/s) i

# Examples

generate duplicate distribution for files in folder /dir/duplicates/ and its subfolders
generate duplicate distribution file /dir/dist_file for files in folder /dir/duplicates/ and its subfolders

./DEDISgen -f -p/dir/duplicates/
./DEDISgen -f -p/dir/duplicates/ -o/dir/dist_file

generate duplicate distribution for device /path/device. Use a block size of 8192 Bytes (8KB)
generate duplicate distribution file /dir/dist_file for device /path/device. Use a block size of 8192 Bytes (8KB)

./DEDISgen -d -p/path/device -b8192
./DEDISgen -d -p/path/device -b8192 -o/dir/dist_file


# Deduplication distribution FILE:
Expand Down

0 comments on commit 1576fbf

Please sign in to comment.