Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Aug 7, 2024
1 parent 40f547b commit 92d3ef1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
3 changes: 2 additions & 1 deletion server/src/telemetry/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ impl Metrics {
let name_lookup_latency_opts = prometheus::HistogramOpts::new(
"name_lookup_latency",
"Latency of the name lookup endpoint",
);
)
.buckets(vec![0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5]);
let name_lookup_latency = Histogram::with_opts(name_lookup_latency_opts).unwrap();
registry
.register(Box::new(name_lookup_latency.clone()))
Expand Down
20 changes: 10 additions & 10 deletions test/data/bulk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export const dataset_name_bulk: Dataset<
},
{
label: 'DNSRegistry',
arg: qs.stringify({ names: ['luc.computer', 'antony.sh'] }, { encode: false }),
arg: qs.stringify({ names: ['luc.computer', 'luc.cash'] }, { encode: false }),
expected: {
response: [
{ type: 'success', address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
{ type: 'success', address: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190' },
{ type: 'success', address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
],
response_length: 2,
},
Expand Down Expand Up @@ -151,15 +151,15 @@ export const dataset_address_bulk: Dataset<
},
{ encode: false }
),
expected: { response: [{ type: 'success', name: 'antony.sh' }], response_length: 1 },
expected: { response: [{ type: 'success', name: 'luc.cash' }], response_length: 1 },
},
{
label: 'DNSRegistry',
arg: qs.stringify(
{ addresses: ['0x2B5c7025998f88550Ef2fEce8bf87935f542C190'] },
{ addresses: ['0x225f137127d9067788314bc7fcc1f36746a3c3B5'] },
{ encode: false }
),
expected: { response: [{ type: 'success', name: 'antony.sh' }], response_length: 1 },
expected: { response: [{ type: 'success', name: 'luc.eth' }], response_length: 1 },
},
{
label: 'Errors (invalid address)',
Expand Down Expand Up @@ -245,14 +245,14 @@ export const dataset_universal_bulk: Dataset<
label: 'DNSRegistry',
arg: qs.stringify(
{
queries: ['0x2B5c7025998f88550Ef2fEce8bf87935f542C190', 'antony.sh'],
queries: ['0x225f137127d9067788314bc7fcc1f36746a3c3B5', 'luc.eth'],
},
{ encode: false }
),
expected: {
response: [
{ type: 'success', name: 'antony.sh' },
{ type: 'success', address: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190' },
{ type: 'success', name: 'luc.eth' },
{ type: 'success', address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
],
response_length: 2,
},
Expand All @@ -262,7 +262,7 @@ export const dataset_universal_bulk: Dataset<
arg: qs.stringify(
{
queries: [
'0x2B5c7025998f88550Ef2fEce8bf87935f542C190',
'0x225f137127d9067788314bc7fcc1f36746a3c3B5',
'luc.eth',
'luc.willbreak.eth',
],
Expand All @@ -271,7 +271,7 @@ export const dataset_universal_bulk: Dataset<
),
expected: {
response: [
{ type: 'success', name: 'antony.sh' },
{ type: 'success', name: 'luc.eth' },
{ type: 'success', address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
{ type: 'success', address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
],
Expand Down
22 changes: 6 additions & 16 deletions test/data/single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ export const dataset_name_single: Dataset<{ address: string } | { status: number
},
{
label: 'DNSRegistry',
arg: 'antony.sh',
expected: { address: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190' },
arg: 'luc.cash',
expected: { address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
},
{
label: 'DNSRegistry (offchain DNSSEC)',
arg: 'antony.cash',
expected: { address: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190' },
arg: 'luc.cash',
expected: { address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
},
{
label: 'DNSRegistry (not found)',
Expand Down Expand Up @@ -77,11 +77,6 @@ export const dataset_address_single: Dataset<{ name: string } | { status: number
// arg: '0x225f137127d9067788314bc7fcc1f36746a3c3B5',
// expected: { name: 'luc.computer' },
// },
{
label: 'DNSRegistry',
arg: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190',
expected: { name: 'antony.sh' },
},
// TODO: find 2 ccip primary name addresses
// {
// label: 'CCIP Offchain RS',
Expand Down Expand Up @@ -125,13 +120,8 @@ export const dataset_universal_single: Dataset<
},
{
label: 'DNSRegistry (offchain DNSSEC)',
arg: 'antony.cash',
expected: { address: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190' },
},
{
label: 'DNSRegistry',
arg: '0x2B5c7025998f88550Ef2fEce8bf87935f542C190',
expected: { name: 'antony.sh' },
arg: 'luc.cash',
expected: { address: '0x225f137127d9067788314bc7fcc1f36746a3c3B5' },
},
{
label: 'DNSRegistry (not found)',
Expand Down

0 comments on commit 92d3ef1

Please sign in to comment.