-
Notifications
You must be signed in to change notification settings - Fork 15
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
TortugaAttack
committed
May 23, 2019
1 parent
c9efaca
commit fa52e3a
Showing
13 changed files
with
550 additions
and
102 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
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
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
42 changes: 42 additions & 0 deletions
42
...rc/main/java/org/aksw/iguana/tp/tasks/impl/stresstest/worker/impl/CLIInputFileWorker.java
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.aksw.iguana.tp.tasks.impl.stresstest.worker.impl; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
|
||
public class CLIInputFileWorker extends MultipleCLIInputWorker { | ||
|
||
|
||
private String dir; | ||
|
||
@Override | ||
public void init(String args[]) { | ||
super.init(args); | ||
int i=13; | ||
if(args.length>13) { | ||
processList = new Process[Integer.parseInt(args[13])]; | ||
i++; | ||
} | ||
this.dir = args[i]; | ||
|
||
} | ||
|
||
@Override | ||
protected String writableQuery(String query) { | ||
File f; | ||
|
||
try { | ||
f = new File(dir+File.separator+"tmpquery.sparql"); | ||
f.deleteOnExit(); | ||
try(PrintWriter pw = new PrintWriter(f)){ | ||
pw.print(query); | ||
} | ||
return f.getName(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
|
||
return query; | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
.../main/java/org/aksw/iguana/tp/tasks/impl/stresstest/worker/impl/CLIInputPrefixWorker.java
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.aksw.iguana.tp.tasks.impl.stresstest.worker.impl; | ||
|
||
|
||
public class CLIInputPrefixWorker extends MultipleCLIInputWorker { | ||
|
||
private String prefix; | ||
private String suffix; | ||
|
||
|
||
@Override | ||
public void init(String args[]) { | ||
super.init(args); | ||
int i=13; | ||
if(args.length>15) { | ||
processList = new Process[Integer.parseInt(args[13])]; | ||
i++; | ||
} | ||
this.prefix = args[i]; | ||
this.suffix = args[i+1]; | ||
|
||
} | ||
|
||
|
||
@Override | ||
protected String writableQuery(String query) { | ||
return prefix+" "+query+" "+suffix; | ||
} | ||
|
||
} |
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
Oops, something went wrong.