This file contains hidden or 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
| // translation-agent.js | |
| import express from "express"; | |
| const app = express(); | |
| app.use(express.json()); | |
| // IMPLICIT CONTRACT: expects req.body.text | |
| app.post("/translate", async (req, res) => { | |
| const text = req.body?.text; | |
| const supportedLanguages = ["es", "fr", "de"]; |
This file contains hidden or 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
| // summary-agent.js | |
| import fetch from "node-fetch"; | |
| async function generateReviewSummary(reviewText: string[]) { | |
| // Step 1: Generate summary using LLM | |
| // (This is a placeholder for actual LLM integration) | |
| const summary = `Summary: ${reviewText.join(", ")}`; | |
| // Step 2: Invoke translation agent | |
| const payload = { text: summary }; |
This file contains hidden or 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
| import { Server } from "@modelcontextprotocol/server"; | |
| import { stdioServer } from "@modelcontextprotocol/server/stdio"; | |
| import { TextContent } from "@modelcontextprotocol/types"; | |
| async function serve() { | |
| const server = new Server("refund-agent"); | |
| // Advertise available tools | |
| server.listTools(async () => [ | |
| { |
This file contains hidden or 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
| // translation-agent.js | |
| import express from "express"; | |
| const app = express(); | |
| app.use(express.json()); | |
| // IMPLICIT CONTRACT: expects req.body.text | |
| app.post("/translate", async (req, res) => { | |
| const text = req.body?.text; | |
| const supportedLanguages = ["es", "fr", "de"]; |
This file contains hidden or 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
| import { Server } from "@modelcontextprotocol/server"; | |
| import { stdioServer } from "@modelcontextprotocol/server/stdio"; | |
| import { TextContent } from "@modelcontextprotocol/types"; | |
| async function serve() { | |
| const server = new Server("refund-agent"); | |
| // Advertise available tools | |
| server.listTools(async () => [ | |
| { |
This file contains hidden or 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
| // summary-agent.js | |
| import fetch from "node-fetch"; | |
| async function generateReviewSummary(reviewText: string[]) { | |
| // Step 1: Generate summary using LLM | |
| // (This is a placeholder for actual LLM integration) | |
| const summary = `Summary: ${reviewText.join(", ")}`; | |
| // Step 2: Invoke translation agent | |
| const payload = { text: summary }; |
This file contains hidden or 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
| import java.util.Random; | |
| public class RandomExample { | |
| public static void main(String[] args) { | |
| Random rand = new Random(); | |
| int randomNumber = rand.nextInt(100) + 1; // 1 to 100 | |
| System.out.println("Random number: " + randomNumber); | |
| } | |
| } |
This file contains hidden or 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
| const benchmarkData = require('/home/circleci/benchmarks/com.circleci.samples.todoapp.macrobenchmark-benchmarkData.json') | |
| const COLD_STARTUP_MEDIAN_THRESHOLD_MILIS = YOUR_COLD_THRESHOLD | |
| const WARM_STARTUP_MEDIAN_THRESHOLD_MILIS = YOUR_WARM_THRESHOLD | |
| const HOT_STARTUP_MEDIAN_THRESHOLD_MILIS = YOUR_HOT_THRESHOLD | |
| const coldMetrics = benchmarkData.benchmarks.find(element => element.params.mode === "COLD").metrics.startupMs | |
| const warmMetrics = benchmarkData.benchmarks.find(element => element.params.mode === "WARM").metrics.startupMs | |
| const hotMetrics = benchmarkData.benchmarks.find(element => element.params.mode === "HOT").metrics.startupMs |
This file contains hidden or 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
| - run: | |
| name: Evaluate benchmark results | |
| command: node scripts/eval_startup_benchmark_output.js | |
This file contains hidden or 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
| - run: | |
| name: Download benchmark data | |
| command: | | |
| mkdir ~/benchmarks | |
| gsutil cp -r 'gs://android-sample-benchmarks/macrobenchmark/**/artifacts/sdcard/Download/*' ~/benchmarks | |
| gsutil rm -r gs://android-sample-benchmarks/macrobenchmark | |
| - store_artifacts: | |
| path: ~/benchmarks |
NewerOlder