-
Notifications
You must be signed in to change notification settings - Fork 12
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
1 parent
3578c49
commit 656b522
Showing
10 changed files
with
144 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
on: [push] | ||
|
||
name: Test | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install latest nightly | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Run cargo fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: -- --check | ||
|
||
- name: Run cargo clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
|
||
- name: Run cargo test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test |
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,8 @@ | ||
[workspace] | ||
members = ["crates/gatling"] | ||
|
||
[workspace.package] | ||
authors = ["Exploration Team @ StarkWare <@keep-starknet-strange>"] | ||
edition = "2021" | ||
repository = "https://github.com/keep-starknet-strange/gomu-gomu-no-gatling" | ||
|
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,2 +1,3 @@ | ||
# gomu-gomu-no-gatling | ||
Blazing fast tool to benchmark Starknet sequencers 🦀 | ||
# Gomu Gomu no Gatling | ||
|
||
Blazing fast tool to benchmark Starknet sequencers 🦀. |
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,16 @@ | ||
[package] | ||
name = "gatling" | ||
version = "0.1.0" | ||
edition = "2021" | ||
homepage = "https://github.com/keep-starknet-strange/gomu-gomu-no-gatling" | ||
repository = "https://github.com/keep-starknet-strange/gomu-gomu-no-gatling" | ||
categories = ["command-line", "benchmark", "asynchronous"] | ||
keywords = ["starknet", "cairo"] | ||
description = "Gomu Gomu No Gatling is a blazing fast tool to benchmark Starknet sequencers." | ||
readme = "README.md" | ||
|
||
[dependencies] | ||
env_logger = "0.10.0" | ||
log = "0.4.17" | ||
tokio = { version = "1", features = ["full"] } | ||
thiserror = "1.0.40" |
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,6 @@ | ||
#[derive(Debug, thiserror::Error)] | ||
pub enum GatlingError { | ||
/// Invalid argument was passed. | ||
#[error("invalid args: {0}")] | ||
InvalidArgument(String), | ||
} |
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 @@ | ||
pub mod error; |
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,12 @@ | ||
use log::info; | ||
use std::error::Error; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn Error>> { | ||
// Initialize the logger. | ||
env_logger::init(); | ||
|
||
info!("Starting Gomu Gomu no Gatling..."); | ||
|
||
Ok(()) | ||
} |
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,49 @@ | ||
# Taplo | ||
|
||
[Taplo](https://github.com/tamasfe/taplo) is a TOML validator and formatter. It | ||
provides a command-line interface (CLI) for working with TOML files. | ||
|
||
## Installation | ||
|
||
You can install Taplo using either cargo or Yarn or NPM. | ||
|
||
### Cargo | ||
|
||
```bash | ||
cargo install taplo-cli --locked | ||
``` | ||
|
||
### Yarn | ||
|
||
```bash | ||
yarn global add @taplo/cli | ||
``` | ||
|
||
### NPM | ||
|
||
```bash | ||
npm install -g @taplo/cli | ||
``` | ||
|
||
### Usage | ||
|
||
To check your TOML files for formatting issues, use the following command: | ||
|
||
```bash | ||
npx @taplo/cli fmt --config taplo.toml --check | ||
``` | ||
|
||
To format all TOML files in your project, use the following command: | ||
|
||
```bash | ||
npx @taplo/cli fmt --config taplo.toml | ||
``` | ||
|
||
This command will automatically format the TOML files, ensuring consistent and | ||
readable formatting. | ||
|
||
### Configuration | ||
|
||
Taplo allows you to customize the formatting rules by adding configuration | ||
options. You can find the available options and how to use them | ||
[here](https://taplo.tamasfe.dev/configuration/formatter-options.html). |
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,11 @@ | ||
include = ["../**/*.toml"] | ||
exclude = ["../**/bad.toml"] | ||
|
||
[formatting] | ||
align_entries = false | ||
|
||
[[rule]] | ||
keys = ["dependencies"] | ||
|
||
[rule.formatting] | ||
reorder_keys = true |