diff --git a/benchmarks/singlefeatureendpoint.js b/benchmarks/singlefeatureendpoint.js new file mode 100644 index 00000000..72b23a7f --- /dev/null +++ b/benchmarks/singlefeatureendpoint.js @@ -0,0 +1,16 @@ +import http from 'k6/http'; + +import { sleep } from 'k6'; + +export const options = { + duration: '10s', + vus: 50, + thresholds: { + http_req_failed: ['rate<0.01'], + http_req_duration: ['p(95)<10'] // (95th percentile should be < 10 ms) + } +}; + +export default function () { + http.get('http://127.0.0.1:3063/api/frontend/Eda', { 'headers': { 'Authorization': `${__ENV.TOKEN}` } }); +} diff --git a/server/src/builder.rs b/server/src/builder.rs index 984080f2..31181556 100644 --- a/server/src/builder.rs +++ b/server/src/builder.rs @@ -140,7 +140,7 @@ pub(crate) fn build_offline_mode( } fn build_offline(offline_args: OfflineArgs) -> EdgeResult { - if offline_args.tokens.is_empty() { + if offline_args.tokens.is_empty() && offline_args.client_tokens.is_empty() { return Err(EdgeError::NoTokens( "No tokens provided. Tokens must be specified when running in offline mode".into(), ));