author | Marcel Hlopko <marcel.hlopko@gmail.com> |
Tue, 25 Jun 2013 22:11:10 +0200 | |
changeset 106 | eac4098d544d |
parent 95 | 5336c148406a |
child 110 | 02126b7e1cbb |
permissions | -rw-r--r-- |
93
be975ce27b80
add new imports page, althrough blank
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
diff
changeset
|
1 |
<%= currently_importing "post" %> |
be975ce27b80
add new imports page, althrough blank
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
diff
changeset
|
2 |
|
95 | 3 |
<legend>Upload via HTTP POST</legend> |
93
be975ce27b80
add new imports page, althrough blank
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
diff
changeset
|
4 |
|
95 | 5 |
<p> |
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
6 |
Benchmark data are required to be sent using POST method in the <code>import</code> |
95 | 7 |
parameter. Both <strong>x-www-form-urlencoded</strong> and <strong>JSON</strong> |
8 |
content types are supported. Example <strong>curl</strong> parameters: |
|
9 |
</p> |
|
10 |
||
11 |
<pre> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
12 |
curl '<%= push_imports_url(configuration_id: 1234) %>' \ |
95 | 13 |
--compressed \ |
14 |
-H 'Content-Type: application/x-www-form-urlencoded' \ |
|
15 |
--data-urlencode 'import={"outcomes": [{"benchmark": {"class": "BenchmarkMicro","selector": "ackermann"},"times": [1579,1453,1422,1406,1437]}]}' |
|
16 |
</pre> |
|
17 |
||
18 |
<pre> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
19 |
curl '<%= push_imports_url(configuration_id: 1234) %>' \ |
95 | 20 |
--compressed \ |
21 |
-H 'Content-Type: application/json' \ |
|
22 |
--data '{"outcomes": [{"benchmark": {"class": "BenchmarkMicro","selector": "ackermann"},"times": [1579,1453,1422,1406,1437]}]}' |
|
23 |
</pre> |
|
24 |
||
25 |
<p> |
|
26 |
We listen on following URLs for post requrests: |
|
27 |
</p> |
|
28 |
||
29 |
<table class="table"> |
|
30 |
<tr> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
31 |
<th>Runtime</th> |
95 | 32 |
<th>URL</th> |
33 |
</tr> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
34 |
<% @runtimes.each do |runtime| %> |
95 | 35 |
<tr> |
36 |
<td> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
37 |
<%= runtime.name %> |
95 | 38 |
</td> |
39 |
<td> |
|
106
eac4098d544d
huge refactoring to better fit what we agreed on
Marcel Hlopko <marcel.hlopko@gmail.com>
parents:
95
diff
changeset
|
40 |
<%= link_to push_imports_url(runtime_id: runtime.id) %> |
95 | 41 |
</td> |
42 |
</tr> |
|
43 |
<% end %> |
|
44 |
||
45 |
</table> |