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 http from "k6/http"; | |
| import { check, sleep } from "k6"; | |
| // Simulated user behavior | |
| export default function () { | |
| let data = { | |
| model: "llama3.1", | |
| messages: [ | |
| {role: "user", content: "why is the sky blue?"} | |
| ], |
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
| Karolis has a green car | |
| Luke has a blue car | |
| Kai has a red car |
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
| [ | |
| { | |
| "id": "gapp_1", | |
| "name": "Uptime Kuma", | |
| "description": "monitoring", | |
| "website": "https://github.com/louislam/uptime-kuma", | |
| "manifestUrl": "https://raw.githubusercontent.com/synpse-hq/synpse/feature/appstore/apps/uptime-kuma.yaml", | |
| "tags": [], | |
| "thumbnail": "https://raw.githubusercontent.com/louislam/uptime-kuma/master/public/icon.svg", | |
| "author": "Louis Lam", |
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
| { | |
| "cat": { | |
| "size": "small", | |
| "price": 50 | |
| }, | |
| "dog": { | |
| "size": "medium", | |
| "price": 120 | |
| }, | |
| "cow": { |
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
| { | |
| "nothing": "here" | |
| } |
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
| nothing-here |
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
| # This file contains the contact information for repositories exposed through | |
| # the Sunstone registry. Each repository has an alias, a url to a file and | |
| # one or more maintainers. | |
| # | |
| # The structure of the repositories object is: | |
| # repositories: | |
| # - alias: example | |
| # url: https://example.com/deployment.yaml | |
| # maintainers: | |
| # - name: foo |
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
| unc (m *FirestoreBinManager) BinDelete(ctx context.Context, binID string) error { | |
| _, err := m.client.Collection(m.binsCollection).Doc(binID).Delete(ctx) | |
| if err != nil { | |
| m.logger.Errorw("failed to delete bin doc by ref", | |
| "error", err, | |
| ) | |
| } | |
| // Now, get all the requests and delete them in a batch request | |
| iter := m.client.Collection(m.reqsCollection).Where("Bin", "==", binID).Documents(ctx) | |
| numDeleted := 0 |
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
| func (m *BinManager) BinPut(ctx context.Context, b *bin.Bin) (err error) { | |
| b.Requests = nil | |
| encoded, err := proto.Marshal(b) | |
| if err != nil { | |
| return err | |
| } | |
| return m.storage.Store(ctx, "bins/"+b.Id, encoded, nil) | |
| } | |
| ... | |
| // store package |
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
| func (m *FirestoreBinManager) BinPut(ctx context.Context, b *bin.Bin) (err error) { | |
| _, err = m.client.Collection(m.binsCollection).Doc(b.GetId()).Set(ctx, b) | |
| return err | |
| } |
NewerOlder