This is the new version of this: JavaScriptにおける各種yield方式のパフォーマンス計測
make
This is the new version of this: JavaScriptにおける各種yield方式のパフォーマンス計測
make
{ | |
const sleepZeroMsgChannel = () => { | |
return new Promise((resolve) => { | |
const ch = new MessageChannel(); | |
ch.port1.addEventListener('message', () => resolve()); | |
ch.port2.postMessage(0); | |
ch.port1.start(); | |
}); | |
}; |
/* | |
Copyright 2023 Moyatani Shusui | |
original code is made by akiomik | |
https://github.com/akiomik/xk6-nostr | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
2023-09-06
relay.damus.io
(strfry v1.9.4 30b8c38
) returns events in incorrect order.
I would say the relay should be updated with the latest version.
And, no new version of strfry
has been released for a long time,
even though there have been many commits since the last release.
/** | |
* To the extent possible under law, the person who associated CC0 | |
* with this work has waived all copyright and related or | |
* neighboring rights to this work. | |
* | |
* https://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
import fs from 'fs/promises'; | |
import path from 'path'; | |
import util from 'util'; |
class NostrEvent extends Event { | |
constructor(event) { | |
super('event'); | |
this.event = event; | |
} | |
} | |
const createBatchSubscription = () => { | |
let timer = null; | |
let filters = []; |
I hereby claim:
To claim this, I am signing this object:
node_modules/ | |
package-lock.json |
/** | |
* This file is licensed under MIT license, not AGPL. | |
* | |
* Copyright (c) 2023 Syusui Moyatani | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
// This code is Public domain (Creative Commons Zero CC0-1.0) | |
// https://creativecommons.org/publicdomain/zero/1.0/deed.ja | |
// from nostr-tools (Public domains) | |
export type NostrEvent = { | |
id?: string; | |
kind: number; | |
tags: string[][]; | |
pubkey: string; | |
content: string; |