Skip to content

Commit fbd7337

Browse files
committed
chore: try new url
1 parent c1d58ee commit fbd7337

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.evergreen/perf_send.mjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import * as fs from 'fs/promises';
55
import { inspect } from 'util';
66
console.log(process.versions);
7-
const API_PATH = "https://performance-monitoring-service-rest.server-tig.prod.corp.mongodb.com/raw_perf_results";
7+
const API_PATH = 'https://performance-monitoring-api.corp.mongodb.com/raw_perf_results';
88

99
const resultFile = process.argv[2];
1010
if (resultFile == undefined) {
11-
throw new Error("Must specify result file");
11+
throw new Error('Must specify result file');
1212
}
1313

1414
// Get expansions
@@ -58,26 +58,25 @@ const body = {
5858
console.log(inspect(body, { depth: Infinity }));
5959

6060
const resp = await fetch(API_PATH, {
61-
method: "POST",
61+
method: 'POST',
6262
headers: {
63-
"Content-Type": "application/json",
64-
"accept": "application/json"
63+
'Content-Type': 'application/json',
64+
accept: 'application/json'
6565
},
6666
body: JSON.stringify(body)
6767
});
6868

69-
7069
console.log(await resp.text());
7170

7271
let jsonResponse;
7372
try {
7473
jsonResponse = await resp.json();
7574
} catch (e) {
76-
throw new Error("Failed to parse json response", { cause: e });
75+
throw new Error('Failed to parse json response', { cause: e });
7776
}
7877

7978
console.log(inspect(jsonResponse, { depth: Infinity }));
8079

8180
if (!jsonResponse.message) throw new Error("Didn't get success message");
8281

83-
console.log("Successfully posted results");
82+
console.log('Successfully posted results');

0 commit comments

Comments
 (0)