File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import {check} from 'k6';
2
2
import http from 'k6/http' ;
3
3
import { Trend } from 'k6/metrics' ;
4
4
5
- const host = __ENV . HOST || '127.0.0.1:3000 ' ;
5
+ const host = __ENV . HOST || '127.0.0.1:8080 ' ;
6
6
7
7
const totalTime = new Trend ( 'total_time' , true ) ;
8
8
const tokenizationTIme = new Trend ( 'tokenization_time' , true ) ;
@@ -41,7 +41,7 @@ export default function () {
41
41
} ) ;
42
42
43
43
const headers = { 'Content-Type' : 'application/json' } ;
44
- const res = http . post ( `http://${ host } ` , payload , {
44
+ const res = http . post ( `http://${ host } /predict ` , payload , {
45
45
headers, timeout : '20m'
46
46
} ) ;
47
47
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import {check} from 'k6';
2
2
import grpc from 'k6/experimental/grpc' ;
3
3
import { Trend } from 'k6/metrics' ;
4
4
5
- const host = __ENV . HOST || '127.0.0.1:3000 ' ;
5
+ const host = __ENV . HOST || '127.0.0.1:8080 ' ;
6
6
7
7
const totalTime = new Trend ( 'total_time' , true ) ;
8
8
const tokenizationTIme = new Trend ( 'tokenization_time' , true ) ;
Original file line number Diff line number Diff line change 1
1
import grpc from 'k6/experimental/grpc' ;
2
2
import { Counter , Trend } from 'k6/metrics' ;
3
3
4
- const host = __ENV . HOST || '127.0.0.1:3000 ' ;
4
+ const host = __ENV . HOST || '127.0.0.1:8080 ' ;
5
5
6
6
const streamCounter = new Counter ( 'stream_counter' ) ;
7
7
const totalTime = new Trend ( 'total_time' , true ) ;
Original file line number Diff line number Diff line change @@ -15,17 +15,18 @@ pub(crate) fn prometheus_builer(max_input_length: usize) -> Result<PrometheusBui
15
15
16
16
// Input Length buckets
17
17
let input_length_matcher = Matcher :: Full ( String :: from ( "te_request_input_length" ) ) ;
18
- let input_length_buckets: Vec < f64 > = ( 0 ..100 )
19
- . map ( |x| ( max_input_length as f64 / 100.0 ) * ( x + 1 ) as f64 )
18
+ let input_length_buckets: Vec < f64 > = ( 0 ..20 )
19
+ . map ( |x| 2.0_f64 . powi ( x) )
20
+ . filter ( |x| ( * x as usize ) <= max_input_length)
20
21
. collect ( ) ;
21
22
22
23
// Batch size buckets
23
24
let batch_size_matcher = Matcher :: Full ( String :: from ( "te_batch_next_size" ) ) ;
24
- let batch_size_buckets: Vec < f64 > = ( 0 ..2048 ) . map ( |x| ( x + 1 ) as f64 ) . collect ( ) ;
25
+ let batch_size_buckets: Vec < f64 > = ( 0 ..13 ) . map ( |x| 2.0_f64 . powi ( x ) ) . collect ( ) ;
25
26
26
27
// Batch tokens buckets
27
28
let batch_tokens_matcher = Matcher :: Full ( String :: from ( "te_batch_next_tokens" ) ) ;
28
- let batch_tokens_buckets: Vec < f64 > = ( 0 ..100_000 ) . map ( |x| ( x + 1 ) as f64 ) . collect ( ) ;
29
+ let batch_tokens_buckets: Vec < f64 > = ( 0 ..21 ) . map ( |x| 2.0_f64 . powi ( x ) ) . collect ( ) ;
29
30
30
31
// Prometheus handler
31
32
PrometheusBuilder :: new ( )
You can’t perform that action at this time.
0 commit comments