Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nano fixes #727

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jetstream/jsapi_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export interface SubjectTransformConfig {
export interface StreamConsumerLimits {
/**
* The default `inactive_threshold` applied to consumers.
* This value is specified in nanoseconds. Pleause use the `nanos()`
* This value is specified in nanoseconds. Please use the `nanos()`
* function to convert between millis and nanoseconds. Or `millis()`
* to convert a nanosecond value to millis.
*/
Expand Down Expand Up @@ -983,11 +983,11 @@ export interface ConsumerUpdateConfig {
*/
"max_batch"?: number;
/**
* The maximum expires value that may be set when doing a pull on a Pull Consumer
* The maximum expires value in nanoseconds that may be set when doing a pull on a Pull Consumer
*/
"max_expires"?: Nanos;
/**
* Duration that instructs the server to clean up ephemeral consumers that are inactive for that long
* Duration in nanoseconds that instructs the server to clean up ephemeral consumers that are inactive for that long
*/
"inactive_threshold"?: Nanos;
/**
Expand Down
4 changes: 2 additions & 2 deletions nats-base-client/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1017,11 +1017,11 @@ export type NamedEndpointStats = {
*/
data?: unknown;
/**
* Total processing_time for the service
* Total processing_time for the service in nanoseconds
*/
processing_time: Nanos;
/**
* Average processing_time is the total processing_time divided by the num_requests
* Average processing_time, in nanoseconds, is the total processing_time divided by the num_requests
*/
average_processing_time: Nanos;
/**
Expand Down
2 changes: 1 addition & 1 deletion nats-base-client/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class NamedEndpointStatsImpl implements NamedEndpointStats {
const qii = qi as QueuedIteratorImpl<unknown>;
if (qii?.noIterator === false) {
// grab stats in the iterator
this.processing_time = qii.time;
this.processing_time = nanos(qii.time);
this.num_requests = qii.processed;
this.average_processing_time =
this.processing_time > 0 && this.num_requests > 0
Expand Down
Loading