Skip to content

Commit

Permalink
fix: filtering trace node data based on options trace data an trace c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
tabkram committed Nov 26, 2023
1 parent 8f85b6a commit 5c58ba1
Show file tree
Hide file tree
Showing 6 changed files with 263 additions and 167 deletions.
54 changes: 27 additions & 27 deletions examples/authentication.json
@@ -1,74 +1,74 @@
[
{
"data": {
"id": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4",
"label": "registerUser",
"inputs": [
"john_doe",
"secure_password"
],
"outputs": "User john_doe successfully registered",
"startTime": "2023-11-25T01:03:39.432Z",
"endTime": "2023-11-25T01:03:44.433Z",
"duration": 5001.653791993856,
"elapsedTime": "5 seconds and 1.654 ms",
"id": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6",
"label": "registerUser",
"startTime": "2023-11-26T00:42:47.569Z",
"endTime": "2023-11-26T00:42:52.572Z",
"duration": 5003.4342920184135,
"elapsedTime": "5 seconds and 3.434 ms",
"parallel": false,
"abstract": false,
"createTime": "2023-11-25T01:03:44.433Z"
"createTime": "2023-11-26T00:42:52.574Z"
},
"group": "nodes"
},
{
"data": {
"id": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
"label": "loginUser",
"inputs": [
"john_doe",
"secure_password"
],
"outputs": "User john_doe successfully logged in",
"startTime": "2023-11-25T01:03:44.433Z",
"endTime": "2023-11-25T01:03:47.435Z",
"duration": 3001.4909159839153,
"elapsedTime": "3 seconds and 1.491 ms",
"id": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
"label": "loginUser",
"startTime": "2023-11-26T00:42:52.574Z",
"endTime": "2023-11-26T00:42:55.575Z",
"duration": 3001.52583399415,
"elapsedTime": "3 seconds and 1.526 ms",
"parallel": false,
"abstract": false,
"createTime": "2023-11-25T01:03:47.436Z"
"createTime": "2023-11-26T00:42:55.576Z"
},
"group": "nodes"
},
{
"data": {
"id": "getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
"label": "getUserInformation",
"inputs": [
"john_doe"
],
"outputs": "User Information for john_doe: Full Name - John Doe, Email - john.doe@example.com, Role - User",
"startTime": "2023-11-25T01:03:47.436Z",
"endTime": "2023-11-25T01:03:48.438Z",
"duration": 1002.438874989748,
"elapsedTime": "1 second and 2.439 ms",
"id": "getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
"label": "getUserInformation",
"startTime": "2023-11-26T00:42:55.576Z",
"endTime": "2023-11-26T00:42:56.578Z",
"duration": 1001.4693329930305,
"elapsedTime": "1 second and 1.469 ms",
"parallel": false,
"abstract": false,
"createTime": "2023-11-25T01:03:48.439Z"
"createTime": "2023-11-26T00:42:56.579Z"
},
"group": "nodes"
},
{
"data": {
"id": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6->loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
"source": "registerUser_1700874219431_1d36da54-2bac-4d4f-bfac-65f2523d90c6",
"target": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
"id": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4->loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
"source": "registerUser_1700959367569_88728e4a-ba6f-4315-ab86-7d670b3d44f4",
"target": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
"parallel": false
},
"group": "edges"
},
{
"data": {
"id": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10->getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
"source": "loginUser_1700874224433_068689d5-2c61-4b33-a2be-8d72c8748e10",
"target": "getUserInformation_1700874227436_30684d33-74df-45ef-a56c-4f3ad26084b8",
"id": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095->getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
"source": "loginUser_1700959372574_56d9c88e-a911-4d4e-94f5-38976209c095",
"target": "getUserInformation_1700959375576_93196be8-e7d4-428e-84a4-d2bae3257163",
"parallel": false
},
"group": "edges"
Expand Down
4 changes: 1 addition & 3 deletions examples/authentication.ts
@@ -1,5 +1,3 @@
import * as fs from 'fs';

import { ExecutionEngine } from '../src';
import { writeTrace } from './common/writeTrace';

Expand All @@ -8,7 +6,7 @@ async function registerUser(username: string, password: string) {
await new Promise((resolve) => setTimeout(resolve, 5000));
return Promise.resolve(`User ${username} successfully registered`);
} else {
Promise.reject('Invalid registration information');
await Promise.reject('Invalid registration information');
}
}

Expand Down

0 comments on commit 5c58ba1

Please sign in to comment.