File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
packages/app/server/api/repo Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Benchmark Repo Iteration
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ benchmark :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Wait for server to be up (if needed)
11+ run : |
12+ echo "Sleeping 30s to allow server to start (adjust as needed)"
13+ sleep 30
14+ - name : Benchmark repo iteration
15+ run : |
16+ RESPONSE=$(curl -s ${{ secrets.BENCHMARK_URL }}/api/repo/benchmark)
17+ echo "Benchmark response: $RESPONSE"
18+ echo "$RESPONSE" | jq '.'
Original file line number Diff line number Diff line change 1+ import { useOctokitApp } from "../../utils/octokit" ;
2+
3+ export default defineEventHandler ( async ( event ) => {
4+ const signal = toWebRequest ( event ) . signal ;
5+ const app = useOctokitApp ( event , { ignoreBaseUrl : true } ) ;
6+
7+ let repoCount = 0 ;
8+ const start = Date . now ( ) ;
9+
10+ await app . eachRepository ( async ( { repository } ) => {
11+ if ( signal . aborted ) return ;
12+ if ( repository . private ) return ;
13+ repoCount ++ ;
14+ } ) ;
15+
16+ const elapsed = Date . now ( ) - start ;
17+ return { repoCount, elapsed } ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments