Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
change tps queries
Browse files Browse the repository at this point in the history
  • Loading branch information
pieceofr committed Jul 25, 2023
1 parent dfd44b2 commit 166cf76
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions influx_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,27 @@ _end_slot='from(bucket: "tds")|> range(start:'${stop_time2}' ,stop:'${stop_time}

# TPS
_mean_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: mean)
|> group()|>mean()|>toInt()
|> drop(columns: ["_start", "_stop","count"])'
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: mean)
|> median()|> group() |> mean()'

_max_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: max)
|> group()|>max()|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","_time","host_id","count"])'
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: max)
|> median()|> group() |> max()'
_min_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: min)
|> group()|>min()|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","_time","host_id","count"])'

|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: min)
|> median()|> group() |> min()'
_90_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count" )
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every: '${window_interval_long}', fn: (column, tables=<-) => tables |> quantile(q: 0.9))
|> group()
|> quantile(column: "_value", q:0.9)|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","count"])'
|> group()|> quantile(column: "_value", q:0.9)|>toInt()'

_99_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count" )
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every: '${window_interval_long}', fn: (column, tables=<-) => tables |> quantile(q: 0.99))
|> group()
|> quantile(column: "_value", q:0.99)|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","count"])'
|> group()|> quantile(column: "_value", q:0.99)|>toInt()'

# tower_vote_distance
_mean_tower_vote_distance='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
Expand Down

0 comments on commit 166cf76

Please sign in to comment.