Skip to content

Commit 99e9efd

Browse files
committed
organise output files
1 parent c8dd83b commit 99e9efd

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ jobs:
5656
- run:
5757
name: Display system information
5858
command: npm run system-info > ~/Downloads/system_info.txt
59+
- run:
60+
name: Combine CSV files
61+
command: |
62+
head -n 1 `ls ~/Downloads/*.csv | head -n 1` > ~/Downloads/all.csv
63+
tail -n+2 -q ~/Downloads/*.csv >> ~/Downloads/all.csv
5964
- store_artifacts:
6065
path: ~/Downloads
6166
destination: /

test/jasmine/performance_tests/all_test.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ function makeScatterGeo(spec) {
198198
describe('Performance test various traces', function() {
199199
'use strict';
200200

201+
var filename;
202+
201203
afterAll(function(done) {
202-
downloadCSV(tests);
204+
downloadCSV(tests, filename);
203205
// delay for the download to be completed
204206
delay(1000)().then(done)
205207
});
@@ -209,11 +211,28 @@ describe('Performance test various traces', function() {
209211

210212
var testCase = __karma__.config.testCase;
211213

214+
filename = '';
215+
212216
if(testCase) {
213-
if(testCase.tracesType && testCase.tracesType !== spec.traceType) testIt = false;
214-
if(testCase.tracesCount && testCase.tracesCount !== spec.nTraces) testIt = false;
215-
if(testCase.tracesPoints && testCase.tracesPoints !== spec.n) testIt = false;
216-
if((testCase.tracesMode !== 'undefined' && testCase.tracesMode) && testCase.tracesMode !== spec.mode) testIt = false;
217+
if(testCase.tracesType) {
218+
filename += testCase.tracesType;
219+
if(testCase.tracesType !== spec.traceType) testIt = false;
220+
}
221+
222+
if(testCase.tracesMode && testCase.tracesMode !== 'undefined') {
223+
filename += '_' + testCase.tracesMode;
224+
if(testCase.tracesMode !== spec.mode) testIt = false;
225+
}
226+
227+
if(testCase.tracesPoints) {
228+
filename += '_' + testCase.tracesPoints;
229+
if(testCase.tracesPoints !== spec.n) testIt = false;
230+
}
231+
232+
if(testCase.tracesCount) {
233+
filename += '_' + testCase.tracesCount;
234+
if(testCase.tracesCount !== spec.nTraces) testIt = false;
235+
}
217236
}
218237

219238
if(testIt) {

test/jasmine/performance_tests/assets/post_process.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exports.downloadCSV = function(allTests) {
1+
exports.downloadCSV = function(allTests, filename) {
22
var str = [
33
'number of traces',
44
'chart type',
@@ -28,7 +28,7 @@ exports.downloadCSV = function(allTests) {
2828
var myBlob = new Blob([str], {type: 'text/plain'})
2929
var url = window.URL.createObjectURL(myBlob);
3030
a.href = url;
31-
a.download = 'results.csv';
31+
a.download = (filename || 'results') + '.csv';
3232
a.style.display = 'none';
3333
document.body.append(a);
3434
a.click();

0 commit comments

Comments
 (0)