Welcome! Log In Create A New Profile

Advanced

[njs] Fixed benchmark test missed in 78b8cfd5b1e9.

Dmitry Volyntsev
May 18, 2020 10:44AM
details: https://hg.nginx.org/njs/rev/cd1a7a0c3fe9
branches:
changeset: 1390:cd1a7a0c3fe9
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Mon May 18 14:43:00 2020 +0000
description:
Fixed benchmark test missed in 78b8cfd5b1e9.

diffstat:

src/test/njs_benchmark.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 80d95b2881f6 -r cd1a7a0c3fe9 src/test/njs_benchmark.c
--- a/src/test/njs_benchmark.c Mon May 18 13:22:34 2020 +0000
+++ b/src/test/njs_benchmark.c Mon May 18 14:43:00 2020 +0000
@@ -76,6 +76,7 @@ njs_benchmark_test(njs_vm_t *parent, njs
n = test->repeat;
expected = &test->result;

+ ret = NJS_ERROR;
us = njs_time() / 1000;

for (i = 0; i < n; i++) {
@@ -96,7 +97,8 @@ njs_benchmark_test(njs_vm_t *parent, njs
success = njs_strstr_eq(expected, &s);

if (!success) {
- njs_printf("failed: \"%V\" vs \"%V\"\n", expected, &s);
+ njs_printf("%s failed: \"%V\" vs \"%V\"\n", test->name, expected,
+ &s);
goto done;
}

@@ -266,7 +268,7 @@ static njs_benchmark_test_t njs_test[]

{ "external object property ($shared.props.a)",
njs_str("$shared.props.a"),
- njs_str("4294967295"),
+ njs_str("11"),
1000 },

{ "external dump (JSON.stringify($shared.header))",
@@ -395,8 +397,6 @@ main(int argc, char **argv)

njs_vm_start(vm);

- ret = EXIT_FAILURE;
-
ret = njs_vm_array_alloc(vm, &report, 8);
if (ret != NJS_OK) {
njs_printf("njs_vm_array_alloc() failed\n");
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed benchmark test missed in 78b8cfd5b1e9.

Dmitry Volyntsev 69 May 18, 2020 10:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready