-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
191 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/target | ||
/node_modules | ||
.env | ||
.idea |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
query GetWorkersAnalytics($accountTag: string, $datetimeStart: string, $datetimeEnd: string, $scriptName: string) { | ||
viewer { | ||
accounts(filter: {accountTag: $accountTag}) { | ||
workersInvocationsAdaptive(limit: 100, filter: { | ||
scriptName: $scriptName, | ||
datetime_geq: $datetimeStart, | ||
datetime_leq: $datetimeEnd | ||
}) { | ||
sum { | ||
subrequests | ||
requests | ||
errors | ||
} | ||
quantiles { | ||
cpuTimeP50 | ||
cpuTimeP99 | ||
} | ||
dimensions{ | ||
datetime | ||
scriptName | ||
status | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use graphql_client::GraphQLQuery; | ||
|
||
// The paths are relative to the directory where your `Cargo.toml` is located. | ||
// Both json and the GraphQL schema language are supported as sources for the schema | ||
#[derive(GraphQLQuery)] | ||
#[graphql( | ||
schema_path = "gql/schema.graphql", | ||
query_path = "gql/queries.graphql", | ||
)] | ||
pub struct GetWorkersAnalytics; | ||
|
||
#[allow(non_camel_case_types)] | ||
type float32 = f32; | ||
|
||
#[allow(non_camel_case_types)] | ||
type string = String; | ||
|
||
#[allow(non_camel_case_types)] | ||
type Time = String; | ||
|
||
#[allow(non_camel_case_types)] | ||
type uint64 = u64; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
mod gql; | ||
|
||
use worker::*; | ||
|
||
#[event(fetch)] | ||
async fn main(req: Request, env: Env, ctx: Context) -> Result<Response> { | ||
async fn main(_req: Request, _env: Env, _ctx: Context) -> Result<Response> { | ||
Response::ok("Hello, World!") | ||
} |