{"id":18492898,"url":"https://github.com/graphprotocol/agora","last_synced_at":"2025-04-09T16:18:15.115Z","repository":{"id":37902222,"uuid":"292695605","full_name":"graphprotocol/agora","owner":"graphprotocol","description":"Cost model","archived":false,"fork":false,"pushed_at":"2024-10-07T12:50:50.000Z","size":387,"stargazers_count":20,"open_issues_count":3,"forks_count":19,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-04-09T16:18:04.361Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-03T22:46:08.000Z","updated_at":"2024-10-07T12:50:54.000Z","dependencies_parsed_at":"2023-02-15T11:00:56.617Z","dependency_job_id":"b5b66407-e958-4d66-9601-229935abee02","html_url":"https://github.com/graphprotocol/agora","commit_stats":{"total_commits":117,"total_committers":8,"mean_commits":14.625,"dds":"0.32478632478632474","last_synced_commit":"a85f7742826f064caac7be84f74585c16264ebc3"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fagora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fagora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fagora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fagora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/agora/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065280,"owners_count":21041872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T13:11:31.992Z","updated_at":"2025-04-09T16:18:15.095Z","avatar_url":"https://github.com/graphprotocol.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agora\n\n## The evaluation tool\n\nThe source for the evaluation tool lives under this repo at `./agora/`.\n\n### Installation\n\nTo compile and run from source:\n\n**Install Rustup**\nIf you don't have `cargo` already, install it by following the instructions here: https://www.rust-lang.org/tools/install\n\n**Compile and Run**\n\nThe first step in using the tool is to compile it with `cargo`.\n\n```shell\ncd ./agora\ncargo build --release\n```\n\nThe tool will be compiled to `/target/release/`.\n\n```shell\ncd target/release/\n./agora -h\n```\n\nThis should print the available command-line arguments, which, at the time of this writing will look like this:\n\n```\nagora 0.1.0\n\nUSAGE:\n    agora [OPTIONS]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nOPTIONS:\n    -c, --cost \u003ccost\u003e                        A cost model to use for costing\n        --globals \u003cglobals\u003e\n        --grt-per-time \u003cgrt-per-time\u003e\n    -l, --load-log \u003cload-log\u003e...             Load request log file(s) supports json and tree-buf\n        --sample \u003csample\u003e                    Take a sample of the request log. Unit interval [default: 1.0]\n        --save-log \u003csave-log\u003e                Save the request log file. Only tree-buf is supported\n```\n\n**Usage**\n\nThe arguments to the tool are meant to be combined to instruct `agora` to accomplish tasks. What follows are just examples:\n\n```shell\n# Load two log files (from json lines format)\n# Sample the logs at 10%\n# Save the result as a single tree-buf file\n./agora \\\n   --load-log ./log1.jsonl \\\n   --load-log ./log2.jsonl \\\n   --sample 0.1 \\\n   --save-log ./logs.treebuf\n\n# Load the sampled/combined file\n# And evaluate the effectiveness of our pricing\n./agora \\\n  --load-log ./logs.treebuf \\\n  --globals ./globals.json \\\n  --grt-per-time 0.0001 \\\n  --cost ./cost-model.agora\n```\n\n**Cost Models**\n\nAgora uses a specialized language for defining cost models that can react to changes in Query structure\nand parameters.  See the [documentation](https://github.com/graphprotocol/agora/blob/master/docs/README.md) to learn about the Agora cost model language.  \n\n## Copyright\n\nCopyright \u0026copy; 2020 The Graph Foundation.\n\nLicensed under the [MIT license](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fagora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Fagora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fagora/lists"}