Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of the dummy benchmark ##tests
- Loading branch information
Showing
6 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
T=rarun2 time=true | ||
all: | ||
for a in r2pipe/* ; do echo "[TT] $$a" ; $T system="r2 -qi $$a /bin/ls" > /dev/null ; done |
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,4 @@ | ||
Benchmark testsuite | ||
=================== | ||
|
||
Run `make` and compare results with runs of previous commits. |
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,8 @@ | ||
const r2pipe = require("r2pipe"); | ||
const r2 = r2pipe.open() | ||
|
||
console.log("jo") | ||
r2.cmd("aa"); | ||
var res = r2.cmdj("aflj"); | ||
console.log(res); | ||
console.log("done") |
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,4 @@ | ||
import r2pipe | ||
r2=r2pipe.open() | ||
r2.cmd("aa") | ||
print(r2.cmdj("aflj")) |
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,4 @@ | ||
import("r2").then((r2) => { | ||
var a = JSON.parse(r2.cmd("aa;aflj")); | ||
r2.log(JSON.stringify(a)); | ||
}); |
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 @@ | ||
|
||
|
||
System.print("Hello World") | ||
var a = R2.cmd("?E hello world;aaa") | ||
|
||
var json_length = R2.cmd("aflj").count | ||
System.print("input json length = " + json_length.toString) | ||
var obj = R2.cmdj("aflj") | ||
System.print("contains = " + obj.count.toString + " entries") | ||
|
||
class R2Api { | ||
foo=(v) { | ||
//this.foo = v | ||
} | ||
construct new() { | ||
this.foo = 123 | ||
} | ||
fileInfo() { | ||
return R2.cmdj("ij") | ||
} | ||
} | ||
|
||
|
||
var ra = R2Api.new() | ||
/* | ||
var fi = ra.fileInfo() | ||
System.print(fi["core"]) | ||
*/ |