Skip to content

Commit

Permalink
chore: adjust simulate trace filename (#16)
Browse files Browse the repository at this point in the history
* chore: adjust simulate trace filename

Remove the `#` character from the simulate trace filename, as it's probably best to use "POSIX Fully portable filenames".

* chore: adjust the docs
  • Loading branch information
neilcampbell authored Oct 21, 2024
1 parent a383c77 commit 605d0ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Where:

- `timestamp`: The time when the trace file was created, in ISO 8601 format, with colons and periods removed.
- `lastRound`: The last round when the simulation was performed.
- `transactionTypes`: A string representing the types and counts of transactions in the atomic group. Each transaction type is represented as `${count}#${type}`, and different transaction types are separated by underscores.
- `transactionTypes`: A string representing the types and counts of transactions in the atomic group. Each transaction type is represented as `${count}${type}`, and different transaction types are separated by underscores.

For example, a trace file might be named `20220301T123456Z_lr1000_2#pay_1#axfer.trace.avm.json`, indicating that the trace file was created at `2022-03-01T12:34:56Z`, the last round was `1000`, and the atomic group contained 2 payment transactions and 1 asset transfer transaction.
For example, a trace file might be named `20220301T123456Z_lr1000_2pay_1axfer.trace.avm.json`, indicating that the trace file was created at `2022-03-01T12:34:56Z`, the last round was `1000`, and the atomic group contained 2 payment transactions and 1 asset transfer transaction.

## Guiding principles

Expand Down
2 changes: 1 addition & 1 deletion src/debugging/writeAVMDebugTrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function writeAVMDebugTrace(input: AVMTracesEventData): Promise<voi
}, {})

const txnTypesStr = Object.entries(txnTypesCount)
.map(([type, count]) => `${count}#${type}`)
.map(([type, count]) => `${count}${type}`)
.join('_')

const timestamp = new Date().toISOString().replace(/[:.]/g, '')
Expand Down

0 comments on commit 605d0ca

Please sign in to comment.