{"id":21041385,"url":"https://github.com/spektom/spark-flamegraph","last_synced_at":"2025-09-15T12:41:57.621Z","repository":{"id":138109887,"uuid":"104188359","full_name":"spektom/spark-flamegraph","owner":"spektom","description":"Easy CPU Profiling for Apache Spark applications","archived":false,"fork":false,"pushed_at":"2020-08-20T18:44:21.000Z","size":1023,"stargazers_count":45,"open_issues_count":4,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-03T10:14:43.880Z","etag":null,"topics":["apache-spark","cpu-profiling","flamegraph","spark"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spektom.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":"2017-09-20T08:32:11.000Z","updated_at":"2024-08-07T20:53:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef57943f-12dc-45ea-bbb3-b3aa723bf9c2","html_url":"https://github.com/spektom/spark-flamegraph","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/spektom/spark-flamegraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spektom%2Fspark-flamegraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spektom%2Fspark-flamegraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spektom%2Fspark-flamegraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spektom%2Fspark-flamegraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spektom","download_url":"https://codeload.github.com/spektom/spark-flamegraph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spektom%2Fspark-flamegraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275260465,"owners_count":25433378,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["apache-spark","cpu-profiling","flamegraph","spark"],"created_at":"2024-11-19T13:52:01.163Z","updated_at":"2025-09-15T12:41:57.594Z","avatar_url":"https://github.com/spektom.png","language":"Shell","readme":"spark-flamegraph\n================\n\n![Build Status](https://github.com/spektom/spark-flamegraph/workflows/CI/badge.svg)\n\nEasy CPU Profiling for [Apache Spark](https://spark.apache.org/) applications.\n\nThe script `spark-submit-flamegraph` is a wrapper around standard `spark-submit` that generates [Flame Graph](http://www.brendangregg.com/flamegraphs.html).\n\n\u003cimg src=\"flamegraph.png\" height=\"250px\" /\u003e\n\n## Supported Systems\n\n * Amazon EMR\n * Most Linux distributions\n * Mac (with [Homebrew](https://brew.sh/) installed)\n\n## Prerequisites\n\nThe script is adapted for work in [Amazon EMR](https://aws.amazon.com/emr/).\nOtherwise the following utilities must present on your system:\n\n * perl\n * python2.7 (or set `PYTHON` environment variable to the Python executabl)\n * pip (or set `PIP` environment variable to the pip utility)\n\n## Running\n\n```bash\nwget -O /usr/local/bin/spark-submit-flamegraph \\\n  https://raw.githubusercontent.com/spektom/spark-flamegraph/master/spark-submit-flamegraph\n\nchmod +x /usr/local/bin/spark-submit-flamegraph\n```\n\nUse `spark-submit-flamegraph` as a replacement for the `spark-submit` command.\n\n## Configuration\n\nTo configure use the following environment variables:\n\n| Environment Variable | Description  | Default value |\n| -------------------- | ------------ | ------------- |\n| `SPARK_CMD` | Spark command to run | spark-submit |\n| `PYTHON` | Path to the Python executable | python2.7 |\n| `PIP` | Path to the pip utility | pip |\n\nFor example, to profile Spark shell session set `SPARK_CMD` environment variable:\n\n```bash\nSPARK_CMD=spark-shell /usr/local/bin/spark-submit-flamegraph\n```\n\n## Details\n\nThe script does the following operations to make profiling Spark applications as easy as possible:\n\n  * Downloads InfluxDB, and starts it on some random port.\n  * Starts Spark application using original `spark-submit` command, with the StatsD profiler Jar in its classpath and with the configuration that tells it to report statistics back to the InfluxDB instance.\n  * After running Spark application, queries all the reported metrics from the InfluxDB instance.\n  * Run a script that generates the .SVG file.\n  * Stops the InfluxDB instance.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspektom%2Fspark-flamegraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspektom%2Fspark-flamegraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspektom%2Fspark-flamegraph/lists"}