Skip to content

Commit

Permalink
Merge pull request #76 from poap-xyz/remove-performance
Browse files Browse the repository at this point in the history
Remove performance
  • Loading branch information
jm42 authored Jan 29, 2024
2 parents 25113bc + 7518c96 commit c4e54a8
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 112 deletions.
1 change: 0 additions & 1 deletion .yarn/versions/f03c9fda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ undecided:
- poap.js
- "@poap-xyz/drops"
- "@poap-xyz/moments"
- "@poap-xyz/performance"
- "@poap-xyz/poaps"
- "@poap-xyz/providers"
1 change: 0 additions & 1 deletion examples/drops/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"stream": "^0.0.2"
},
"devDependencies": {
"@poap-xyz/performance": "*",
"@types/node-fetch": "^2.6.3",
"ts-node": "^10.4.0",
"typescript": "^4.5.5"
Expand Down
13 changes: 3 additions & 10 deletions examples/drops/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { measurePerformance } from '@poap-xyz/performance';
import { DropsClient } from '@poap-xyz/drops';
import { PoapCompass, PoapDropApi } from '@poap-xyz/providers';
import { fetch_multiple_drops } from './methods/fetch_multiple_drops';
Expand All @@ -20,17 +19,11 @@ async function main(): Promise<void> {
}),
);
// Multiple Drops
await measurePerformance(
() => fetch_multiple_drops(client),
'fetch_multiple_drops',
);
await fetch_multiple_drops(client);
// One Drop by id
await measurePerformance(
() => fetch_single_drop(client),
'fetch_single_drop',
);
await fetch_single_drop(client);
// Create Drop
await measurePerformance(() => create_drop(client), 'create_drop');
await create_drop(client);
}

main().catch((error) => {
Expand Down
1 change: 0 additions & 1 deletion examples/moments/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"node-fetch": "^3.3.1"
},
"devDependencies": {
"@poap-xyz/performance": "*",
"@types/mime": "^3.0.1",
"@types/node": "^18.16.0",
"@types/node-fetch": "^2.6.3",
Expand Down
18 changes: 4 additions & 14 deletions examples/moments/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { measurePerformance } from '@poap-xyz/performance';
import { MomentsClient } from '@poap-xyz/moments';
import {
PoapCompass,
Expand Down Expand Up @@ -30,22 +29,13 @@ async function main(): Promise<void> {
const client = new MomentsClient(momentsApi, compass);
// Create Moment

await measurePerformance(() => create_moment(client), 'create_moment');
await create_moment(client);
// Fetch multiple moments
await measurePerformance(
() => fetch_multiple_moments(client),
'fetch_multiple_moments',
);
await fetch_multiple_moments(client);
// Fetch one moment by id
await measurePerformance(
() => fetch_single_moment(client),
'fetch_single_moment',
);
await fetch_single_moment(client);
// Fetch moments by drop ids
await measurePerformance(
() => fetch_moments_by_drop_ids(client),
'fetch_moments_by_drop_ids',
);
await fetch_moments_by_drop_ids(client);
}

main().catch(() => {
Expand Down
1 change: 0 additions & 1 deletion examples/poaps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"stream": "^0.0.2"
},
"devDependencies": {
"@poap-xyz/performance": "*",
"ts-node": "^10.4.0",
"typescript": "^4.5.5"
}
Expand Down
30 changes: 7 additions & 23 deletions examples/poaps/backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { measurePerformance } from '@poap-xyz/performance';
import { PoapsClient } from '@poap-xyz/poaps';
import {
AuthenticationProviderHttp,
Expand Down Expand Up @@ -34,34 +33,19 @@ async function main(): Promise<void> {
}),
);
// Multiple POAPs
await measurePerformance(
() => fetch_multiple_poaps(client),
'fetch_multiple_poaps',
);
await fetch_multiple_poaps(client);
// One POAP by id
await measurePerformance(
() => fetch_single_poap(client),
'fetch_single_poap',
);
await fetch_single_poap(client);
// Multiple POAPs by collector
await measurePerformance(
() => fetch_multiple_poaps_by_collector(client),
'fetch_multiple_poaps_by_collector',
);
await fetch_multiple_poaps_by_collector(client);
// Multiple POAPs by drop
await measurePerformance(
() => fetch_multiple_poaps_by_drop_id(client),
'fetch_multiple_poaps_by_drop_id',
);
await fetch_multiple_poaps_by_drop_id(client);
// mint Sync POAP
await measurePerformance(() => mint_sync_poap(client), 'mint_sync_poap');
await mint_sync_poap(client);
// mint Async POAP
await measurePerformance(() => mint_async_poap(client), 'mint_async_poap');
await mint_async_poap(client);
// Email Reservation POAP
await measurePerformance(
() => email_reservation_poap(client),
'email_reservation_poap',
);
await email_reservation_poap(client);
}

main().catch((error) => {
Expand Down
1 change: 0 additions & 1 deletion package-order.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ DIRS=(
"packages/providers"
"packages/drops"
"packages/poaps"
"packages/performance"
"packages/moments"
)
28 changes: 0 additions & 28 deletions packages/performance/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/performance/rollup.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/performance/src/index.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/performance/tsconfig.json

This file was deleted.

9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -893,12 +893,6 @@ __metadata:
languageName: unknown
linkType: soft

"@poap-xyz/performance@*, @poap-xyz/performance@workspace:packages/performance":
version: 0.0.0-use.local
resolution: "@poap-xyz/performance@workspace:packages/performance"
languageName: unknown
linkType: soft

"@poap-xyz/poaps@*, @poap-xyz/poaps@workspace:packages/poaps":
version: 0.0.0-use.local
resolution: "@poap-xyz/poaps@workspace:packages/poaps"
Expand Down Expand Up @@ -1806,7 +1800,6 @@ __metadata:
resolution: "backend-drops-example@workspace:examples/drops/backend"
dependencies:
"@poap-xyz/drops": "*"
"@poap-xyz/performance": "*"
"@poap-xyz/providers": "*"
"@poap-xyz/utils": "*"
"@types/node": ^18.16.0
Expand All @@ -1825,7 +1818,6 @@ __metadata:
resolution: "backend-moments-example@workspace:examples/moments/backend"
dependencies:
"@poap-xyz/moments": "*"
"@poap-xyz/performance": "*"
"@poap-xyz/providers": "*"
"@poap-xyz/utils": "*"
"@types/mime": ^3.0.1
Expand All @@ -1845,7 +1837,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "backend-poaps-example@workspace:examples/poaps/backend"
dependencies:
"@poap-xyz/performance": "*"
"@poap-xyz/poaps": "*"
"@poap-xyz/providers": "*"
"@poap-xyz/utils": "*"
Expand Down

0 comments on commit c4e54a8

Please sign in to comment.